Implemented inverse matrix cache for programming assignment 2.