test case failed on [1,2], custom test case on OJ passed, but failed after submitted on this case

```
public class Solution {
static int min=Integer.MAX_VALUE;
public int minDepth(TreeNode root) {
TreeNode runner=root;
if(root==null) return 0;
helpMin(root,0);
return min;
}
public void helpMin(TreeNode runner, int depth){
if(runner==null) return ;
depth=depth+1;
if(runner.left==null&&runner.right==null){
min=Math.min(min,depth);
return ;
}
else{
helpMin(runner.left,depth);
helpMin(runner.right,depth);
}
}
}
```