“If we imagine a worm that crawls around the periphery of the forest, seeing a ‘(’ whenever it passes the left edge of a node…

trees, worms, algorithm, Knuth

“If we imagine a worm that crawls around the periphery of the forest, seeing a ‘(’ whenever it passes the left edge of a node and a ‘)’ whenever it passes a node’s right edge, that worm will have reconstructed the original string“