Question: An alternative method of performing an in order tree walk of an n-node binary search tree finds the minimum element in the tree by calling
An alternative method of performing an in order tree walk of an n-node binary search tree finds the minimum element in the tree by calling TREE-MINIMUM and then making n - 1 calls to TREE-SUCCESSOR. Prove that this algorithm runs in Θ(n) time.
Step by Step Solution
3.41 Rating (170 Votes )
There are 3 Steps involved in it
That a call to TREEMINIMUM followed by n 1 calls to TREESUCCESSOR performs exactly the same in order walk of the tree as does the procedure INORDERTRE... View full answer
Get step-by-step solutions from verified subject matter experts
