Challenge solutions from http://www.cprogramming.com/challenge.html