[LCP]linked list question
Vincent.Penquerch at artworks.co.uk
Wed Apr 3 01:40:05 UTC 2002
> Now I found that when allocating new nodes it would be
> quickest to add
> them on the head-end rather than the tail-end. Obviously with the
> disadvantage, of the nodes appearing in reverse.
It may not apply, but using a double linked list (eg ptrs to both
previous and next node) would make the speed question solved, with
a minimal memory overhead (eg one ptr per attachment is probably
Moreover, since you'll most likely use some kind of malloc, and
that the number of attachments probably won't go to the hundreds,
the time spent walking the list will be dwarved by the the other
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the linuxCprogramming