Y
Hacker News
new
|
ask
|
show
|
jobs
by
seiferteric
1683 days ago
Does it have to be one or the other? You could allocate blocks of memory for the list then when it will be filled up you allocate more and add a pointer to it.
1 comments
dmurray
1683 days ago
This breaks O(1) access by index, because the objects in the list may have different sizes.
link