Skip to content
  • Linkedin
  • Youtube
  • Pinterest
  • Home
  • Privacy Policy
  • About
  • Contact
Programmingoneonone

Programmingoneonone

Programmingoneonone is a website that publishes daily tutorials, methods, guides, and articles on IT, Education, and technology.

  • Home
  • Human Values
  • DSA
  • IoT Tutorials
  • Interview Questions and Answers
  • Toggle search form
Linked list in data structures and algorithms

Linked list in Data Structure

Posted on 11 May 202023 April 2023 By YASH PAL No Comments on Linked list in Data Structure

The linked list is a basic data structure. it’s an abstract data type that stores data in a noncontinuous memory location and is made up of nodes.

After completing this tutorial you will be able to learn

  1. What is a Linked list?
  2. The node of the linked list
  3. Example of a linked list
  4. Advantages of linked list
  5. Disadvantages of linked list

In the array, we have the data arranged in a sequential and continuous memory location. as you see in the image given below.

linked list in data structures

What is a Linked List?

In the linked list data is not arranged in sequential order. as you see in the image given below. but with each item, a reference to the next item is stored in a memory location. so all the data is connected together with the help of links.

linked list in data structures

The node of the linked list

A node is a basic building block of the linked list. the list item together with the link is called a node of the linked list.

Linked list - Data structure and algorithms

so all the nodes are connected together in a form to represent the linear order of the list. The info part of the linked list contains the actual value and the link part store the reference to the next value of the linked list.

Linked list - Data structure and algorithms

Here is an example of a linked list that contains six nodes. and all the values of the linked list are connected using the link of every node.

Note: the first node contains the value of the first node and a reference to the second node. as well as the second node containing the value of the second node and a reference to the third value and soon.

we only need to remember and store the reference of the first node. using the reference of the first node we can traverse the whole list and can access all the elements of the list.

Start variable

to implement a linked list we only store the reference to the first node using the start variable.

The advantage of the linked list

a linked list is a dynamic data structure. it means we don’t need to give the size of the linked list at the compile time of the program. we can give the size at the running time of the program. and also we can increase and decrease the size at the run time.

Data in a linked list is not stored in a contiguous memory location. we don’t need a contiguous memory to store the data of the linked list. it chooses randomly from the blank memory space to store the data.

Insertion and deletion of elements are easier and they can be used to implement abstract data types like lists, stacks, and queues.

The disadvantage of the linked list

we cannot access the data of the linked list in a random manner. like we need to traverse the whole list if we need to access the last element of the linked list.

to implement the linked list, we need extra memory. and this extra memory is used to store the links of every node.

Types of linked list

  1. single linked list
  2. double linked list
  3. circular linked list
  4. linked lists with header node
  5. sorted linked list
Computer Science Tutorials, Data Structures Tutorials Tags:computer science, Data Structure

Post navigation

Previous Post: Big o notation in data structures
Next Post: Traversing in Linked List

Related Tutorials

Reading input in c programming Reading Input in a C program C Programming Tutorials
The First C Program C Programming Tutorials
Compiling C Programs C Programming Tutorials
History of c programming language HISTORY OF C Programming Language C Programming Tutorials
c character sets C Character Sets C Programming Tutorials
c programming interview questions and answers C Programming Interview Questions and Answers C Programming Tutorials

Leave a Reply Cancel reply

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

Pick your Subject

  • Internet of Things
  • Data Structures/Algorithms
  • Interview Preparation
  • Human Values
  • Java Interview Questions and Answers (2023)
    Thinking of becoming a Java developer? I must say it’s a good choice! Java is continuously named the most popular programming language. And the...

    Learn More “Java Interview Questions and Answers (2023)” »

  • Iot(Internet of things) in healthcare
    IoT in Healthcare
    IoMT (Internet of Medical Things) stands for devices that can collect and exchange data – either with users or other devices via the internet,...

    Learn More “IoT in Healthcare” »

  • four stages of iot solution for industry
    IoT for Industry
    In this post, we are going to learn about use cases of IoT for Industry and four stages for providing IoT solutions. Machine Diagnosis...

    Learn More “IoT for Industry” »

  • Iot for agricultural
    IoT in Agriculture
    IoT technology has realized smart wearables, connected devices, automated machines, and driverless cars. However, in agriculture, the IoT has brought the greatest impact. Amongst the challenges...

    Learn More “IoT in Agriculture” »

  • Iot for logistics
    IoT in Logistics and Supply Chain
    IoT applications for smart logistics and supply chain systems:  Logistics Fleet Tracking  To track the locations of the vehicles in real time, the vehicle...

    Learn More “IoT in Logistics and Supply Chain” »

  • Algorithms Tutorials
  • Basic Programming
  • C Programming Tutorials
  • C++ Tutorials
  • Compiler Design Tutorials
  • Computer Networks Tutorials
  • Computer Organization Tutorials
  • Computer Science Tutorials
  • Data Structures Tutorials
  • DBMS Tutorials
  • Developer Guide
  • Digital Communication
  • Digital Logic Tutorials
  • Internet of Things Tutorials
  • Internet Tutorials
  • Interview questions answers
  • Java Tutorials
  • Javascript Tutorials
  • Machine Learning Tutorials
  • Operating Systems Tutorials
  • Programming Tutorials
  • Projects
  • Tips&Tricks
  • Tools
  • VBScript Tutorials
  • Java Interview Questions and Answers (2023)
    Thinking of becoming a Java developer? I must say it’s a good choice! Java is continuously named the most popular programming language. And the...

    Learn More “Java Interview Questions and Answers (2023)” »

  • Iot(Internet of things) in healthcare
    IoT in Healthcare
    IoMT (Internet of Medical Things) stands for devices that can collect and exchange data – either with users or other devices via the internet,...

    Learn More “IoT in Healthcare” »

  • four stages of iot solution for industry
    IoT for Industry
    In this post, we are going to learn about use cases of IoT for Industry and four stages for providing IoT solutions. Machine Diagnosis...

    Learn More “IoT for Industry” »

  • Iot for agricultural
    IoT in Agriculture
    IoT technology has realized smart wearables, connected devices, automated machines, and driverless cars. However, in agriculture, the IoT has brought the greatest impact. Amongst the challenges...

    Learn More “IoT in Agriculture” »

  • Iot for logistics
    IoT in Logistics and Supply Chain
    IoT applications for smart logistics and supply chain systems:  Logistics Fleet Tracking  To track the locations of the vehicles in real time, the vehicle...

    Learn More “IoT in Logistics and Supply Chain” »

Copyright © 2023 Programmingoneonone.

Powered by PressBook Blog WordPress theme