I am getting the wrong output.
Https://ide.codingblocks.com/s/229537
Your tree construction part is wrong. You have assumed that the tree is complete whereas, it hasn’t been mentioned anywhere in the question.
I am getting the wrong output.
Your tree construction part is wrong. You have assumed that the tree is complete whereas, it hasn’t been mentioned anywhere in the question.