attempting programming challenges from http://www.reddit.com/r/dailyprogrammer