Problem in driver code


#1

Please check the driver code for this problem because the expected output option shows “1” as the answer for the input(number of terms followed by nodes of the tree)
20 19 8 9 2 3 1 5 7 4 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
but when I am trying to submit my code the expected output is “2” while my code’s output is “1” which is correct. I have checked for this tree by drawing is and the answer should be “1” please do correct this mistake.