Yandex Interview Question

Simple algorithms likes swaps, sorts etc.