Pocket Gems interview question

One coding problem each round as well as several follow-ups.