- 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 18 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 lar
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
[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
[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.