Modifications to convert cacheVector to cacheSolve
for Programming Assignment 2