Create the binary tree
var root = newNode ( 2 ) ; root . left = newNode ( 1 ) ; root . right = newNode ( 4 ) ; root . left . left = newNode ( 10 ) ; root . left . right = newNode ( 8 ) ; root . right . left = newNode ( 5 ) ; root . right . right = newNode ( 10 ) ; document . write ( findMaxXor ( root ) ) ;