Solution for Programming Assignment 2

Added a cache for matrix inversion