|
|
|
|
|
by larrik
316 days ago
|
|
That sounds more like a linked list than an array. In C, an array is just contiguous bytes, and you reach an index through math (starting location + (index * size)). Pretty sure lots of languages still do this to some degree, as your lookup times are effectively zero, though altering the number of elements is way more complex/expensive than in a linked list. |
|
By the way, that's the only reason why C-derived languages use unintuitive zero-based indexing. There's really no other reason to call the first element a[0] instead of a[1].