Driver Code
public static void main ( String [ ] args ) { node NewRoot = null ; node root = newNode ( 2 ) ; root . left = newNode ( 7 ) ; root . right = newNode ( 5 ) ; root . left . right = newNode ( 6 ) ; root . left . right . left = newNode ( 1 ) ; root . left . right . right = newNode ( 11 ) ; root . right . right = newNode ( 9 ) ; root . right . right . left = newNode ( 4 ) ; if ( iterativeSearch ( root , 6 ) ) System . out . println ( " Found " ) ; else System . out . println ( " Not ▁ Found " ) ; if ( iterativeSearch ( root , 12 ) ) System . out . println ( " Found " ) ; else System . out . println ( " Not ▁ Found " ) ; } }