@@ -0,0 +1,865 @@
+/**%0A *%09Given a binary tree, find its minimum depth.%0A *%0A *%09The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.%0A *%0A *%09Author: matao%0A *%0A */%0A%0A%0Aclass TreeNode %7B%0A%09int val;%0A%09TreeNode left;%0A%09TreeNode right;%0A%09TreeNode(int x) %7B val = x; %7D%0A%7D%0A%0Apublic class MinimumDepthOfBinaryTree %7B%0A%09public int minDepth(TreeNode root) %7B%0A%09%09if (root == null)%7B%0A            return 0;%0A        %7D%0A        if (root.left == null && root.right == null)%7B%0A            return 1;%0A        %7D%0A        int leftDepth = Integer.MAX_VALUE;%0A        if (root.left != null)%7B%0A            leftDepth = minDepth(root.left) + 1 ;%0A        %7D%0A        int rightDepth = Integer.MAX_VALUE;%0A        if (root.right != null)%7B%0A            rightDepth = minDepth(root.right) + 1;%0A        %7D%0A        %0A        return leftDepth %3C rightDepth ? leftDepth : rightDepth;%0A    %7D%0A%7D

add Minimum Depth Of Binary Tree solution