Finally got to completing problem 11 using lisp.