Viagogo Interview Question

Hacker Rank coding challenge