Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
tptacek
13y ago
0 comments
Save
Share
Different purpose?
0 comments
2 comments · 1 top-level
top
newest
oldest
afhof
13y ago
· 1 in thread
Linked lists are good for adding and removing elements. Variable length arrays are good for allocating a known amount of space at runtime.
tptacek
OP
13y ago
The "variable" in "variable length" describes the fact that you
don't
know how much space you need, and insertions to the end of a variable-length array are very fast. I can see why you thought my comment was weird, now.
j
/
k
navigate · click thread line to collapse