@@ -0,0 +1,509 @@
+%0Apublic class _111MinimumDepthOfBinaryTree %7B%0A    public int minDepth(TreeNode root) %7B%0A    %09if (root == null) return 0;%0A    %09if (root.left != null && root.right != null)%0A    %09%09return 1 + Math.min(minDepth(root.left), minDepth(root.right));%0A    %09else if (root.left != null) return 1 + minDepth(root.left);%0A    %09else if (root.right != null) return 1 + minDepth(root.right);%0A    %09else return 1;%0A    %7D%0A    %0A%09public class TreeNode %7B%0A%09%09int val;%0A%09%09TreeNode left;%0A%09%09TreeNode right;%0A%09%09TreeNode(int x) %7B val = x; %7D%0A%09%7D%0A%7D%0A

Add 111 solution