[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
-
answerhappygod
- Site Admin
- Posts: 899604
- 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!