行列を使用して操作を実装する必要があり、行列のサイズは可変でなければなりません。私が思いついた唯一の解決策は、リンクされたリストを使用することです:
[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] ...
...
しかし、それは少し複雑に思えます..より良い(そしてより簡単な)解決策はありますか?
君たちありがとう!