def min_depth(self, root):
if root is None:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>if root.left is not None or root.right is not None:<EOL><INDENT>return max(self.minDepth(root.left), self.minDepth(root.right))+<NUM_LIT:1><EOL><DEDENT>return min(self.minDepth(root.left), self.minDepth(root.right)) + <NUM_LIT:1><EOL>
:type root: TreeNode
:rtype: int