Find Kth minimum node in a binary tree and suggest a complexity
Utilisateur anonyme
Do a preorder traversal of the tree which is O(n). Then use a pivot quicksort method to find the kth index which is K(log(n)). So the total runtime is O(n +K(log(n)))