Linked List Data Structure

Kevin Gicheha
2 min readNov 23, 2022

--

Linked Lists vs Arrays

A linked list is a linear collection of data, in which elements are not stored at a contiguous memory location. It is made up of independent objects, which are known as nodes. Each node has two fields: one contains the data and the second contains a pointer that references the next node.

Types of Linked Lists

Singly Linked List: can only navigate forward when traversing a list.

Image Source: geeksforgeeks.org
Time and Space Complexity of Singly Linked List

Doubly Linked List: can navigate forward and backward when traversing a list.

Image Source: geeksforgeeks.org

Circular Linked List: the last element in the list points back to the first element.

Linked Lists vs. Arrays

Linked lists are regularly compared to arrays. Each structure has its advantages and disadvantages. The structure one chooses to implement depends on the problem one want to solve. Here’s a list of the differences between linked lists and arrays:

Linked Lists vs Arrays
Linked List vs Arrays

Citation

https://www.simplilearn.com/tutorials/data-structure-tutorial/linked-list-in-data-structure#:~:text=A%20linked%20list%20is%20the,reference%20to%20the%20next%20node.

--

--