Tip 1 : Practice DS and Algo questions as much as possible
Tip 2 : Try to build a solution and optimize it
Tip 1 : Updated
Tip 2 : Simple and covers everything



‘X’ = { 00, 01, 02, 10, 11, 12, 20, 21, 22 }.
If there are more than one possible such strings, then you can output any of them.
Medium level difficulty



For the given binary search tree and k = 3

The 3rd smallest node is highlighted in yellow colour.
The idea is to maintain the rank of each node. We can keep track of elements in the left subtree of every node while building the tree. Since we need the K-th smallest element, we can maintain the number of elements of the left subtree in every node.
How do you write an OS?
Tip 1 : Build a solution while asking questions

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?