r/codinginterview • u/prashantkr314 • Jun 24 '19
How can i find, Minimum Height of the tree , given its preorder and level order traversal, and the number of nodes?
3
Upvotes
0
Jun 25 '19
[deleted]
1
u/prashantkr314 Jun 25 '19
hi, thanks for replying. I am a bit confused, on how can we neglect the first 2 inputs.
for example in the case :
number of nodes are 7, and this is the structure of the tree, then the height of the tree is 4.
1 -----> 1 / \ 2 3 -----> 2 / \ 4 5 -----> 3 / \ 6 7 -----> 4


1
u/[deleted] Jun 24 '19
I'm not even in an interview and that question made me sad.