Page 1 of 1

[2 points] You have a binary search tree with n elements that has height h = O(log(n)), and you need to find the kth lar

Posted: Fri May 20, 2022 6:18 pm
by answerhappygod
2 Points You Have A Binary Search Tree With N Elements That Has Height H O Log N And You Need To Find The Kth Lar 1
2 Points You Have A Binary Search Tree With N Elements That Has Height H O Log N And You Need To Find The Kth Lar 1 (94.07 KiB) Viewed 20 times
[2 points] You have a binary search tree with n elements that has height h = O(log(n)), and you need to find the kth largest element in the tree. Can one find the kth largest element without traversing through the whole tree (assuming k<n)? If yes, which algorithm should be used? If not, provide a counterexample supporting your answer.