Separators matter
transcript
You must test if one tree is inside another. Writing both as strings is the trick. But a small detail can fool the test. It is the separator.
Without a separator, twelve writes one, two, hash, hash. That contains the walk of the tree two. With a comma before each token, it does not.
The value twelve ends in the digit two. Without a separator, digits blend together. Each token must stay whole.
Read the walk of twelve as one, two, then two markers. Read the walk of the tree two as two, then two markers. The second walk is a tail of the first one. That is the whole problem.
Without separators the test says yes. With separators it says no, which is right.
Test values with several digits. Test a negative value, with its sign. Test a tree of one node.
Put a separator before each value. Then walks cannot hide inside walks. Full breakdown in the lecture.