Codility interview question

Video interview, with past experience - situational