Find nth largest value in a BST

Hi there I was just going through your this post a…

bakwasscoder - Jun 5, 2012

Hi there
I was just going through your this post and had a small doubt.
Shouldn’t we do a stack based iterative traversal to get the correct value in this code ? This recursive may give wrong result as it will start counting after the rightmost element has been found. This element won’t be the nth largest in BST.
What do you think ? Nice blog, anyways!


See also