README ¶ < Previous Next > 652. Find Duplicate Subtrees (Medium) Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any one of them. Two trees are duplicate if they have the same structure with same node values. Example 1: 1 / \ 2 3 / / \ 4 2 4 / 4 The following are two duplicate subtrees: 2 / 4 and 4 Therefore, you need to return above trees' root in the form of a list. Related Topics [Tree] Similar Questions Serialize and Deserialize Binary Tree (Hard) Serialize and Deserialize BST (Medium) Construct String from Binary Tree (Easy) Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files find_duplicate_subtrees.go Click to show internal directories. Click to hide internal directories.