Added code for Assignment 2 (Inverse Matrix with caching support)