for the left view question, what’s the error in the code- https://ide.codingblocks.com/s/232822
Left view of a binary tree
sorry the previous has some mistakes, this is the code and it is giving wrong outputhttps://ide.codingblocks.com/s/232873
your logic is correct,
but you are building the tree is preorder fashion
the input is however in level order fashion