Rolta interview question

Difficulty level moderate