Back to problems

Kth Largest Element in a BST

Algorithm · Uber · Medium

Problem Construct a Binary Search Tree and return the element that ranks Kth when the tree's values are ordered from largest to smallest. For the following BST: when K=3, the answer is 7. Examples Example

Checking your access…