Yandex interview question

To create an algorithm for designing an automatic discionary