Pregunta de entrevista de Yandex

Revert a binary tree in a set amount of time.