i want to make the -1 input to NULL so that it doesn’t make create its left and right pointer and leave it for the next consecutive node
eg = 1,2,3,4,5,-1,-1,6,7,8,9,10,11
it should make the tree like this-
1
/ \
2 3
/ \ /
4 5 n n
/ \ /
6 7 8 9
/
10 11
but it is making it like this -
1
/ \
2 3
/ \ / \
4 5 n n
/ \ / \ /\
6 7 8 9 10 11
: and don’t forgot to mark doubt as resolved 