CoDev interview question

Codility test. About 3 to 4 pseudocode