Driver program to test above function
root = Node ( - 15 ) NEW_LINE root . left = Node ( 5 ) NEW_LINE root . right = Node ( 6 ) NEW_LINE root . left . left = Node ( - 8 ) NEW_LINE root . left . right = Node ( 1 ) NEW_LINE root . left . left . left = Node ( 2 ) NEW_LINE root . left . left . right = Node ( 6 ) NEW_LINE root . right . left = Node ( 3 ) NEW_LINE root . right . right = Node ( 9 ) NEW_LINE root . right . right . right = Node ( 0 ) NEW_LINE root . right . right . right . left = Node ( 4 ) NEW_LINE root . right . right . right . right = Node ( - 1 ) NEW_LINE root . right . right . right . right . left = Node ( 10 ) NEW_LINE print " Max ▁ pathSum ▁ of ▁ the ▁ given ▁ binary ▁ tree ▁ is " , maxPathSum ( root ) NEW_LINE