linked list

S

sophia

Dear all,

Is there any condition / requirement that nodes in linked list
must be stored in contigous memory locations ?
 
C

Chris Dollin

sophia said:
Is there any condition / requirement that nodes in linked list
must be stored in contigous memory locations ?

No.

(this is not a C question.)
 
G

gw7rib

Dear all,

Is there any condition / requirement that nodes in linked list
must be stored in contigous memory locations ?

Far from it. Some of the main advantages of a linked list are that you
can delete nodes in the middle of a list without having to move
anything, add new nodes at the end, add extra nodes in the middle
(again without moving anything), and change the order of the nodes
without actually moving them. This would not be possible if the nodes
had to be stored in contiguous locations.

Hope that helps.
Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top