111.Minimum Depth of Binary Tree Posted on 2017-09-13 | In LeetCode Solution 1: accepted 1msDFS. 123456789101112131415class Solution { public int minDepth(TreeNode root) { if (root == null) { return 0; } else { int left = minDepth(root.left); int right = minDepth(root.right); if (root.left == null || root.right == null) { return Math.max(left, right) + 1; } else { return Math.min(left, right) + 1; } } }}