Implement solution for makeCacheMatrix and cacheSolve functions.