problem set from http://www.codeabbey.com/