Understanding iterative maximum search
Finding the maximum value in a binary search tree iteratively is also quite simple since we only need to traverse in one direction, and so we can use a simple loop.
Algorithm
The iterative algorithm for finding the maximum value is similar to the recursive algorithm. We replace recursive calls with a loop and keep going right until we reach the rightmost node, which is where the maximum is.
Liking the course? Check our discounted plans to continue learning.