GGK Tech interview question

Given a scenario based question