/    /  Data Structures-Singly Linked List

Singly Linked List

 

A singly-linked list is a collection of ordered sets of elements. The node in a singly-linked list contains the data part and the linked part. The elements in it may vary in numbers based on the programs. 

The data part of the node consists of information, while the linked part consists of the address. 

It can traverse in only one direction. 

 

Operations of a singly linked list:

 

  1. Node Creation

Example:

 

 

      2. Deletion 

It consists of:

Deletion at the beginningIt deletes the node at the beginning of the list.
Deletion at the end of the list.It deleted the node at the end of the list.
Deletion after specified node.It deletes the node after the specified node.

 

    3. Traversing

We visit every node at least once to perform certain operations.

 

      4. Insertion

Insertion at the beginningIt inserts the node at the beginning of the list.
Insertion at the endIt inserts the node at the end of the list.
Insertion after a specified node.It inserts the node after the specified node.

 

Reference

Singly Linked List