Very nice solution. I think where to put the cur.val value in the string does not matter, right?
Also, why [0,0,0,0,null,null,0,null,null,0,0] should only return [], but not [ ]?
Find Duplicate Subtrees
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.