Driver Code
let root = new TreeNode ( 5 ) ; root . left = new TreeNode ( 3 ) ; root . right = new TreeNode ( 2 ) ; root . left . left = new TreeNode ( 1 ) ; root . left . right = new TreeNode ( 4 ) ; root . right . left = new TreeNode ( 1 ) ; root . right . right = new TreeNode ( 2 ) ;