No one has replied
If like you said, this is an UNDEFINED problem. In fact, in this problem, we should think that p and q are all in the tree root.
How can this be O(n)? This is O(kn) since the push needs k.
// 3 lines
It's my fault, thanks!
nums should probably better be const.
man, that's so cool
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.