Assignment Submission matrix inverse and caching

Tested the code, test case added in comments