Shouldn't the result of [1,1,1,1,null,1] be 2? Why I'm told 3
3 is correct. Why do you think it should be 2?
There is an empty node in the third level, (1 (1 (1 null)) (1 (1 null))) , so min depth 2?
Just found out, the definition of leafnode is node with two empty child. So node with only one empty child is not leafnode.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.