Solution to Assigment2. Cached Inverse of a Matrix