Re:Linked lists in C, with open source ADT
by afhof on Saturday January 19, 2013 @09:16PM
(#5085693)
Someone wants to know about linked lists, and your comment is to use some other data structure that has a different purpose?
[ Parent
| on HN ]
Re:Linked lists in C, with open source ADT
by tptacek on Saturday January 19, 2013 @09:39PM
(#5085749)
Different purpose?
Re:Linked lists in C, with open source ADT
by afhof on Saturday January 19, 2013 @09:45PM
(#5085763)
Linked lists are good for adding and removing elements. Variable length arrays are good for allocating a known amount of space at runtime.
Re:Linked lists in C, with open source ADT
by tptacek on Saturday January 19, 2013 @09:46PM
(#5085768)
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.