Driver code
root = new Node ( 5 ) ; root . left = new Node ( 1 ) ; root . right = new Node ( 6 ) ; root . left . left = new Node ( 3 ) ; root . right . left = new Node ( 7 ) ; root . right . right = new Node ( 4 ) ; if ( check ( root ) == true ) document . write ( " " ) ; else document . write ( " " ) ;