Savant Degrees interview question

Algorithm based question is, find the depth of tree