Toptal interview question

Codility test