Yandex interview question

Algorithms, data structure/ live coding