|
|
|
|
|
by skohan
2591 days ago
|
|
It depends on the implementation. In some cases, where arrays are required to be stored in contiguous memory, appending to an array will result in a copy anyway since the entire contents will have to be moved to a new, larger block of memory. |
|
Here's a stackoverflow answer which talks a bit more about this: https://cs.stackexchange.com/a/9382