Basic Linked List Operations

49
views
Basic Linked List Operations
(Last Updated On: June 28, 2018)

In this tutorial, we’ll learn about Basic Linked List Operations which will be used throughout your programming career.

These Basic Linked List Operations include from basic to advance operations.

  1. Creating a Linked List.
  2. Transversing the Linked List.
  3. Printing the Link List.
  4. Counting the nodes in the Linked List.
  5. Searching an item in the Linked List.
  6. Inserting an item.
  7. Deleting an item.
  8. Concatenation two lists.
  9. Inversion.
  10. Sorting of elements stored in a linked list.
  11. Merging of two Sorted Link list.
  12. Separating a linked list into two linked lists.

Datatype for linked list as an ADT (Abstract Data Type)

{
    int data;
    strut node * next;
} node;

Note: Data above is assumed to be of integer type.

Below are Operations on the Linked List

  1. Create
  2. Delete
  3. Insert
  4. Make null
  5. Search
  6. Print
  7. Sort

Prototype of functions used for various operations

node * create();
node * delete (node * head, int location);
node * insert (node * head, int data, int location)
node * make *** (node * head);
node * search (node * head, int data);
void print (node * head);
void sort (node * head);

Data Structures Algorithms Books: Algorithms Plus Data Structures

Ask your questions and clarify your/others doubts on Basic Linked List Operations by commenting or posting on our forum.

PREVIOUS
CIRCULAR LINKED LIST
NEXT
COMING SOON