Constructed binary tree is 10 / \ 8 2 / \ / 3 5 2 \ 1 / 9
root = newNode ( 10 ) NEW_LINE root . left = newNode ( 8 ) NEW_LINE root . right = newNode ( 2 ) NEW_LINE root . left . left = newNode ( 3 ) NEW_LINE root . left . right = newNode ( 5 ) NEW_LINE root . right . left = newNode ( 2 ) NEW_LINE root . right . left . right = newNode ( 1 ) NEW_LINE root . right . left . right . left = newNode ( 9 ) NEW_LINE print ( findMaxBends ( root ) - 1 ) NEW_LINE