top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

C: Check if a Binary Tree contains duplicate subtrees of size 2 or more?

+1 vote
604 views

For example

Input : Binary Tree

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

Output : Yes

posted Mar 9, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

Binary tree need to fulfill following two conditions for being a heap –
* It should be a complete tree (i.e. all levels except last should be full).
* Every node’s value should be greater than or equal to its child node (considering max-heap).

C/C++ code would be helpful?

+1 vote

How to balance the binary search tree in C/C++? Please provide the necessary explanation also?

...