Why expected result for input of {1,2} is 2? Shouldn't it be 1?

It is indeed arguable whether the Minimum depth of binary tree {1,2} is 1 or 2, It depends on the way one define the depth, if you want the shortest distance to a null node, then the answer would be 1 else if you want the shortest distance to a null node whose sibling is also a null node, in which case the answer to Binary tree{1,2} would be 2.

@1337c0d3r at least add some description and examples to the question to make this clear. right now its ambiguous.Its been 4 years and people are still visiting this thread says something it.