binary tree creation 5 / \ - 10 3 / \ / \ 9 8 - 4 7
root = getNode ( 5 ) NEW_LINE root . left = getNode ( - 10 ) NEW_LINE root . right = getNode ( 3 ) NEW_LINE root . left . left = getNode ( 9 ) NEW_LINE root . left . right = getNode ( 8 ) NEW_LINE root . right . left = getNode ( - 4 ) NEW_LINE root . right . right = getNode ( 7 ) NEW_LINE x = 7 NEW_LINE print ( " Count ▁ = " , countSubtreesWithSumXUtil ( root , x ) ) NEW_LINE