DS Mod 3 Notes
DS Mod 3 Notes
Linked List
Linked list or one-way list (Singly linked list) is a linear collection of data elements called nodes
where each node is divided into two parts;
The first part contains the information of the element
The second part called the link field or next pointer field, contains the address of the next node in the
list.
Consider the following Examples:
C Representation
typedef struct listNode *listPointer;
typedef struct
{
int data;
listPointer link;
}listNode;
Create two node list
#create a linked list with two nodes
Node Representation: