single and double linked lists

181 views

I read it like 5 times and I don’t understand

In: 1

4 Answers

Anonymous 0 Comments

Objects in the list are not stored in memory sequentially.

As such, when you need to find the next item in the list, you need a pointer telling you where to go.

In a single link list these pointers are monodirectional. They point you toward the next item in the list and the last item often points you back to the first.

In a double link list the pointers are bidirectional. They point you toward the next item as well as the previous one.

This can make certain operations faster, but takes up more memory.

You are viewing 1 out of 4 answers, click here to view all answers.