0
$\begingroup$

Due to the linear nature of computer memory, row-major and column-major matrices have different performance for row- vs. column access. The obvious solution would be to keep two copies of the same data sorted accordingly. Is there a DS with better space complexity?

$\endgroup$
2
  • 1
    $\begingroup$ You can have a look at en.wikipedia.org/wiki/Iliffe_vector $\endgroup$
    – Sagnik
    Feb 11, 2018 at 17:13
  • $\begingroup$ Thanks. An Iliffe vector is just a vector of pointers to arrays, so doesn't unify column vs. row access. For matrices with big data nodes a linked 'grid' (vs. linked list) might be an option. $\endgroup$ Feb 12, 2018 at 18:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.