我需要用矩阵实现运算,矩阵的大小必须是可变的。我想出的唯一解决方案是使用链表:
[pointer to this row, pointer to another row] -> [element 1,1; link to another element] -> [element 1,2, link to another element] -> .... -> [nil]
|
v
[pointer to this row, pointer to another row] ...
...
但在我看来有点复杂。有没有更好(更简单)的解决方案?
谢谢你们!