Solved Programming Assignment 2 (CacheMatrix)