Pergunta de entrevista da empresa Nokia

A coding question to check if tree is balanced or not