Code edit

Edited the program and included cache and matrix inverse
functionalities as required in the assignment