Finished solution for the cache matrix problem.