GSK Interview Question

Hacker rank coding/scripting round, yet to be taken