Problem with my code

what is wrong with it.

hello @Parmeet-Kalsi-1631789033630118
ur build tree function is not correct , it will stop just seeing very first -1.
but there can be input available after -1 as well.
refer this code for buildtree->
image