interview-corner
interview-corner copied to clipboard
Binary Tree : Nodes without sibling
For a given Binary Tree of type integer, print all the nodes without any siblings.
The first and the only line of input will contain the node data, all separated by a single space. Since -1 is used as an indication of whether the left or right node data exist for root, it will not be a part of the node data.
Input Sample
2 4 5 6 -1 -1 7 20 30 80 90 -1 8 9 -1 -1 -1 -1 -1 -1 -1 -1 -1
Output Sample
6 8 7 9
@Abhijit2505 Can I work on this?
@purnima143 please get started
can i do this @Abhijit2505
@Abhijit2505 pls assign me this issue, I can do this in C++