Given a Binary Search Tree (BST) and a positive integer k, find the k’th largest element in the Binary Search Tree.
For example, in the following BST, if
if k = 3, then output should be 12
if k = 5, then output should be 9.
[20]
/ \
[8] [22]
/ \
[5] [10]
/ \
[9] [12]
For example, in the following BST, if
if k = 3, then output should be 12
if k = 5, then output should be 9.