The point is that <i>this is not a &quot;know it or not&quot; question</i>.  You should be able to derive this answer, even if you&#x27;ve never seen it before, by combining things that you <i>should</i> have seen, because they show up all the time in CS.<p>In the first approach he gives, you need to divide the problem into smaller subproblems, knowing that a tree is the combination of either two branches that are themselves trees or a single leaf node.  What&#x27;s the rule for determining whether two trees are symmetric?  Well, if both of them are leaves, the answer is trivially true.  If one of them is a leaf and the other is a branch, the answer is trivially false.  If they are both branches, then you need to make sure that the left branch matches the reversed copy of the right branch, and vice versa, i.e. left is symmetric to right and right is symmetric to left.  And you have the solution he gave.<p>That also clues you in to the second solution, where you define &quot;symmetric&quot; as &quot;the reverse of tree1 is equal to tree2&quot;, and then write appropriate recursive helper functions for this.<p>What the author&#x27;s really testing for is &quot;Can you decompose problems that you don&#x27;t know how to do into problems that you do know how to do?&quot;  This is a critical skill for doing anything new, and the vast majority of economic gains in the software industry go to people producing <i>new</i> stuff and not looking up other peoples&#x27; solutions.  Effectively, what he&#x27;s trying to select for is folks who <i>don&#x27;t believe</i> this is a matter of received wisdom and instead are willing to figure it out themselves.<p>(Interestingly, there&#x27;s a bug in his code.  It doesn&#x27;t affect the correctness of the point he&#x27;s trying to make, but would be infuriating to an actual Javascript programmer working with this function.  See if you can spot it before he merges my pull request...)