The function receives pointer to the structure that contains a sparse matrix and releases all the engaged memory by the structure.
How to realize this?
Code:#include <stdlib.h> #include <stdio.h> typedef int Elem; typedef struct cell Cell; typedef Cell * Matrix; struct cell { int row; int col; Cell * right; Cell * down; Elem value; };Code:void freeSparseMatrix(Matrix m) { .... }