interview-corner icon indicating copy to clipboard operation
interview-corner copied to clipboard

Binary Tree : Nodes without sibling

Open purnima143 opened this issue 4 years ago • 4 comments

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

image

purnima143 avatar Jan 08 '21 08:01 purnima143

@Abhijit2505 Can I work on this?

purnima143 avatar Jan 08 '21 08:01 purnima143

@purnima143 please get started

Abhijit2505 avatar Jan 17 '21 08:01 Abhijit2505

can i do this @Abhijit2505

vilsi12 avatar Feb 02 '21 17:02 vilsi12

@Abhijit2505 pls assign me this issue, I can do this in C++

ravikr126 avatar Feb 17 '21 18:02 ravikr126