Pergunta de entrevista da empresa UBS

write an algorithm to find the depth of n-ary tree