sparse matrix implemented with linklist