Olympusat interview question

It was a scenario based and asked to code the test case