Nayya interview question

How would you improve this? (when given a specific scenario)