[LeetCode] Maximum Depth of Binary Tree in Objective C

typedef struct {
int value;
struct TreeNode *left;
struct TreeNode *right;
} TreeNode;
- (int)maximumDepth:(TreeNode *)node
{
if (!node) return 0;
return MAX(maximumDepth(node.left), maximumDepth(node.right)) + 1;
}
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.