...
/Solution Review: Finding Kth Maximum Value in Binary Search Tree
Solution Review: Finding Kth Maximum Value in Binary Search Tree
A detailed analysis of the different ways to solve the “Finding Kth Maximum Value in Binary Search Tree” challenge.
We'll cover the following...
We'll cover the following...
Solution 1: Sorting the tree in order #
In this solution, sort the tree in order by using a variation of the inOrderPrint() function that was studied in the “In-Order Traversal” lesson, and return the th last element!
Time complexity
This solution is in ...