# [LeetCode] Maximum Depth of Binary Tree in Objective C

**Maximum Depth of Binary Tree | LeetCode OJ**

*Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the…*leetcode.com

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;

}