Savant Degrees Interview Question

Algorithm based question is, find the depth of tree