| Topic | Difficulty | Companies |
|---|---|---|
| Binary Tree | EASY | Amazon Goldman Sachs |
Given a binary tree, write a program to find the maximum depth of the binary tree.
Problem Note
Example
Input: Given binary tree,
[5, 3, 6, 2, 4, -1, -1, 1, -1, -1, -1, -1, -1]
5
/ \
3 6
/ \
2 4
/
1
Output: return its depth = 4