Assignment2: Caching inverse of the matrix