



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Sparse Matrices
−
−
0 0 0 15
0 4 0 0
12 5 0 0
0 0 11 0
Circular linked list
Linked Representation for Matrix
#define MAX_SIZE 50 /* size of largest matrix */ typedef enum {head, entry} tagfield; typedef struct matrix_node *matrix_pointer; typedef struct entry_node { int row; int col; int value; }; typedef struct matrix_node { matrix_pointer down; matrix_pointer right; tagfield tag; union { matrix_pointer next; entry_node entry; } u; }; matrix_pointer hdnode[MAX_SIZE];