McKinsey & Company interview question

Easiest level hackkerrank array rotation question