Toptal interview question

Code test on codility consists of 3 questions