Completed programming assignment 2 for matrix inverse caching