New answers tagged

4 votes
Accepted

Multidimensional vs nested arrays

There is nothing that you can do with multidimensional arrays that you couldn’t do with nested arrays. The proof: many popular programming languages (C, C++, Java, Swift, …) offer only nested arrays ...
user avatar
  • 68.6k
2 votes

Multidimensional vs nested arrays

Multi dimensional arrays are just single dimension arrays with math done on the indexing. You can access any cell in O(1). Nested arrays have indirection. Accessing them is slower because of that ...
user avatar

Top 50 recent answers are included