Back to Browse

Find Node in Binary Search Tree - Part 2: Iterative Solution

365 views
Apr 22, 2018
7:26

In this video, we will look at the iterative solution to find the node with a given key in a binary search tree. In the recursive solution we've seen in part 1 (https://www.youtube.com/watch?v=7jTOKORg1QY), we essentially move to the left when the key is smaller than the key of the current root (by calling the function recursively), and move to the right when it is larger. We can easily implement this process iteratively. C++ code for find Node iterative function: cs.phyley.com/binary-search-tree/find-node/part-2-iterative-solution

Download

0 formats

No download links available.

Find Node in Binary Search Tree - Part 2: Iterative Solution | NatokHD