How do you search for an element in a binary tree?
Anonymous
Initially we start with root node. At first we check if the given number is equal to the root node value,if yes we stop searching further and if not we check if the given value is less the root node value or greater than it..if it's greater we move on to the right subtree of the parent root else to the left.This way the algorithm goes on.
Check out your Company Bowl for anonymous work chats.