Swivl interview question

General question and the task was given