Giftcards.com interview question

Nothing too difficult here.