code: def min_depth(self, root):
      
      if root is None:
          return 0
      if root.left is not None or root.right is not None:
          return max(self.minDepth(root.left), self.minDepth(root.right))+1
      return min(self.minDepth(root.left), self.minDepth(root.right)) + 1
docs: :type root: TreeNode
      :rtype: int