Click here to see the full article post
for second method, if the input is a nullptr then it will have runtime error.
@xwEm [null] input is invalid and  will never be the input as binary tree is non-empty.
oh okay. I got what you mean. It was in the description.
Why do you need two queues? One queue could do the work.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.