Uber Interview Question

Finding kth smallest element in a BST

Interview Answer

Anonymous

Oct 17, 2015

Many ways to solve it: a. Keep track of subtree sizes and solve by elimination in O(logN) b. Do an in-order traversal and solve it in O(N)

1