This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Please don't post a complete solution to the problem. We encourage people to figure it out for themselves. Hint, suggest, or lead them to the answer, but please don't provide a fully implemented program.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors