GSK interview question

Hacker rank coding/scripting round, yet to be taken