Depending on the container type, either of your strategies is possible;
but the point about a linked list (i.e. its definition) is that you can
only access an element from an adjacent element, since they are not
stored in a contiguous piece of memory. This means you can insert and
delete elements without 'shuffling along' the pre-existing ones.
So, your first strategy is the one.
Regards,
tom
--
Posted via http://dbforums.com
.
|