Pergunta de entrevista da empresa Bloomberg

Hackerrank coding. Not about balancing a binary tree, more technical and useful.