Implementing a LinkedList

cs101
|
Jan 22, 2014 • Lineker Tomazeli

I finally decided to review all my CS101 skills and there is nothing better than starting with a linked list data structure.
I don’t want to over complicate things. I linked list is simply a chain of nodes. Each node has a space for data and a reference to the next node in the chain. The last node usually points to NULL.
There are 3 different types of linked list:

Single Linked List: Each node points to the next node.

Double Linked List: Each node points to the next node and the previous node.

Circular Linked List: Each node points to the next node but the last node points to the first node.

<figcaption class="wp-caption-text">Single Linked list where the data are integers.</figcaption></figure>

This data structure has a few standard methods that we have learn. These methods are provided so we can manipulate the data. Below you can study my own implementation of a linkedlist using Generics.