Source for https://www.hackerrank.com/contests/twitch/challenges/the-bidding-game