- We can iterate over all contiguous subsets of elements with a given size of a given sequence of elements with a good time complexity scalability.
// todo
if the keypair is in PEM extension, open PuTTY Gen and load the PEM file, then press 'save private key' to save the | |
private key as a PPK file. | |
# SSH with Putty: | |
In Session, add the Host name and the port. | |
In Connection > SSH > Auth, add the PPK file in the 'Private key file for authentication' box. | |
In Connection > Data, add the user for the ssh connection(auto-login username). |
//Default means that it will take the full namespace of the object | |
const defaultValue = ''; | |
const keys = { | |
title: defaultValue, | |
severity: { | |
title: defaultValue, | |
domain: { | |
information: defaultValue, |
Problem - Find the kth smallest/largest number in an unsorted array with n element.
Explanation: https://www.youtube.com/watch?v=hGK_5n81drs&ab_channel=BackToBackSWE
Quick select approach: The way that this is done is by using a form of quick sort. It work by a way of partitioning the array into parts.
Lets say we want to find the kth largest number in an array. If the array was sorted we would know what the index of this number would be, it would be (n - k). Since the array isn't sorted we need to find element for the index (n - k).
Now, to find the element we need to implement quick select. Quick select work like this (for finding the largest K):