Solution of Assignment 2

Cache the calculation of a reverse matrix