Programming Assignment 2 (updated)

edit to cacheSolve