I need to write a program that can store values in a Sparse matrix .
Of course ,using an array is not a good idea since we allocate to much unneeded memory.
My task involves implementing a sparse matrix using linked list and Templates.
My line of thinking is as follows : each node would hold
T* value; // for the template (could be double/int .....) Node* col; // inner class Node* row; // inner class Node Node* next; // not sure about this one
What do you think about it ? I think it would be a problem when I'd want to print the entire
matrix ,wouldn't it ?