badge icon

This article was automatically translated from the original Turkish version.

Article

Linked List Data Structure

Quote

A linked list is a fundamental data structure in computer science. It primarily enables efficient insertion and deletion operations compared to arrays. Like arrays, linked lists are also used to implement other data structures such as stacks, queues, and deques.


Data Structure: Non-contiguous

Memory Allocation: Typically allocated individually for each element

Insertion/Deletion: Efficient

Access: Sequential


Singly Linked List

A singly linked list is a basic data structure consisting of nodes, each containing a data field and a reference to the next node in the list. The next pointer of the last node is null, indicating the end of the list. Linked lists support efficient insertion and deletion operations.


Node Structure

In a singly linked list, each node consists of two parts: data and a pointer to the next node. This structure allows nodes to be dynamically linked together, forming a chain-like sequence.

Singly Linked List Structure (Source: geeksforgeeks.com)


Singly Linked List Operations

  • Traversal – Listing
  • Search
  • Length Calculation
  • Insertion
    • Insert at the beginning
    • Insert at the end
    • Insert at a specific position
  • Deletion
    • Delete from the beginning
    • Delete from the end
    • Delete a specific node


Traversal in Java:


Search in Java:


Length Calculation in Java:


Insertion in Java:


Deletion in Java:

Doubly Linked List

A doubly linked list is a data structure composed of a sequence of nodes, each containing a value and two pointers: one pointing to the previous node and another pointing to the next node in the list. This enables efficient traversal in both directions, making it suitable for applications requiring frequent insertions and deletions.

Doubly Linked List Structure (Credit: geeksforgeeks.com)


In a data structure, a doubly linked list is represented using nodes with three fields:

  • Data
  • A pointer to the next node (next)
  • A pointer to the previous node (prev)


Finding Length in Java:


Element Insertion in Java:


Element Deletion in Java:

Bibliographies

GeeksforGeeks. "Linked List Data Structure." (2024).Accessed Adresi.

GeeksforGeeks. "Singly Linked List Tutorial." (2024).Accessed Adresi.

Geeksforgeeks. "Doubly Linked List Tutorial." (2024).Accessed Adresi.

Kızıltan, Mustafa. "Linked List (Bağlı Listeler)"Accessed Adresi.

Programiz. "Linked List Data Structure."

Ravikiran, A. S. "Types of Linked List in Data Sturctures." (2025).Accessed Adresi.

Author Information

Avatar
AuthorBeyza Nur TürküJuly 14, 2026 at 4:55 PM

Discussions

No Discussion Added Yet

Start discussion for "Linked List Data Structure" article

View Discussions

Contents

  • Singly Linked List

    • Node Structure

    • Singly Linked List Operations

    • Doubly Linked List