Problem 652 · Medium

Find Duplicate Subtrees

Serialize every subtree bottom-up and report roots whose serialization appears twice.

Open the interactive visualisation