Updated the cachematrix.R with the solution