Yandex interview question

Simple algorithms likes swaps, sorts etc.