http://codingbat.com/prob/p204456