Let us cona Binary Tree 4 / \ 4 4 / \ \ 4 9 5
Node root = null ; root = newNode ( 4 ) ; root . left = newNode ( 4 ) ; root . right = newNode ( 4 ) ; root . left . left = newNode ( 4 ) ; root . left . right = newNode ( 9 ) ; root . right . right = newNode ( 5 ) ; Console . Write ( longestSameValuePath ( root ) ) ; } }