Pergunta de entrevista da empresa Yandex

Revert a binary tree in a set amount of time.