Gild Interview Question

Programming puzzles. It may vary.