Pergunta de entrevista da empresa Oracle

Tree related problems, traversing and dynamic programming