top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Connect same level nodes without level order traversal in a Binary Tree?

+6 votes
655 views
Connect same level nodes without level order traversal in a Binary Tree?
posted Nov 26, 2013 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Not able to understand your question, can you please explain more.

Similar Questions
+6 votes

Given binary tree is:

        1
     /     \
    2        3
  /  \        \
 4   5         6
             /   \
            7     8

The output should be 1, 2, 3, 4, 5, 6, 7, 8

+5 votes
      40
      /\
     20 60
     /\  \
   10 30  80
      /   /\
     25  70 90
           \
           75

longest path 
25 30 20 40 60 80 70 75 
Answer
    25 ----> 75
...