LinkedIn Interview Question

Write a function to calculate the maximum depth of a binary tree.