I recently came across a problem that made me wonder. What if I stored a N element array inside an array of length N across all the N indexes. As a tiny example:
[
[1, 2, 3],
[5, 6, 7],
[8, 9, 10],
]
An array of length 3 and at every index there is an array again of length 3
What would be the space complexity? Is it still O(N) or has it change.