Linked list

Linked List :

  • It is linear collection of data elements which are called ‘Nodes’.
  • The elements may or may not be stored in consecutive memory locations like Arrays.
  • Pointers are used to link two nodes. Each node is divided into two parts.
  • A node consists of two parts : INFO part, which is used to store the data and NEXT Pointer, used to point next node to create a linear structure.
  • A START pointer is used to keep the track of starting element in list.
  • NULL value of the NEXT pointer denotes the end of list

Linked List
Algorithms for Insertion and Deletion in Linked List :


INSERTION AT BEGINNING:

INSERTION AT THE END :

INSERTION AT GIVEN POSITION:

Insertion in Linked List - Step 1

 (1)

Insertion in Linked List - Step 2

 (2)

Insertion in Linked List - Step 3

(3)

DELETION IN BEGINNING :

DELETION AT END :

DELETION AT GIVEN POSITION :

Deletion in Linked List - Step 1

(1)

Deletion in Linked List - Step 2

(2)

Insertion in Linked List - Step 1

 (3)

DISPLAY LINKED LIST :

C SOURCE CODE

Leave a Reply

Your email address will not be published. Required fields are marked *