top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Given a binary tree, find the largest subtree having atleast two other duplicate subtrees?

+2 votes
312 views
Given a binary tree, find the largest subtree having atleast two other duplicate subtrees?
posted May 26, 2016 by anonymous
Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Your answer

Preview

Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Similar Questions
+1 vote

For example

Input : Binary Tree

               A
             /    \ 
           B        E
         /   \       \    
        C     D       B     
                     /  \    
                    C    D

Output : Yes

0 votes

Given the root of a Binary Tree along with two integer values. Assume that both integers are present in the tree.
Find the LCA (Least Common Ancestor) of the two nodes with values of the given integers.
2 pass solution is easy. You must solve this in a single pass.

...