I am getting wrong answer in one test case. My code is :
https://ide.codingblocks.com/s/231081 . Can you tell my mistake?
Left View In Left View of Binary Tree
for the i/p
1 2 3 -1 7 4 -1 -1 -1 5 -1 -1
output is coming out 1 2 7
but it should be 1 2 7 5