Linked List
Linked List
A linked list is a linear data structure in
which elements, called nodes, are linked
together in sequence. Unlike arrays, linked
lists do not store elements in contiguous
memory locations.
Basic Terminologies of
LinkedList
Head: The Head of a linked list is a pointer to
the first node or reference of the first node of
linked list. This pointer marks the beginning of
the linked list.
Node: Linked List consists of a series of nodes
where each node has two parts: data and next
pointer.
Data: Data is the part of node which stores the
information in the linked list.
Next pointer: Next pointer is the part of the node
which points to the next node of the linked list.
Features of LinkedLists
1. Dynamic Size:
Linked lists can grow or shrink
dynamically, making them more flexible
than arrays.
2. Non-Contiguous Memory:
Nodes can be scattered across
memory, linked via pointers.
3. Efficient Insertions/Deletions:
Inserting or deleting a node in a linked
list is faster (O(1)) compared to arrays
(O(n)) since there is no need for shifting
elements
Operations on LinkedLists
1. Insertion:
• At the beginning.
• At the end.
• After a specific node.
2. Deletion:
• From the beginning.
• From the end.
• A specific node by value
3. Search:
• Locating a node with a
specific value.
Types of LinkedLists
1.Singly Linked List
2. Doubly Linked List
3. Circular Linked List

PpptPresentationSilgkeLinkListpython.ppt

  • 1.
  • 2.
    Linked List A linkedlist is a linear data structure in which elements, called nodes, are linked together in sequence. Unlike arrays, linked lists do not store elements in contiguous memory locations.
  • 3.
    Basic Terminologies of LinkedList Head:The Head of a linked list is a pointer to the first node or reference of the first node of linked list. This pointer marks the beginning of the linked list. Node: Linked List consists of a series of nodes where each node has two parts: data and next pointer. Data: Data is the part of node which stores the information in the linked list. Next pointer: Next pointer is the part of the node which points to the next node of the linked list.
  • 4.
    Features of LinkedLists 1.Dynamic Size: Linked lists can grow or shrink dynamically, making them more flexible than arrays. 2. Non-Contiguous Memory: Nodes can be scattered across memory, linked via pointers. 3. Efficient Insertions/Deletions: Inserting or deleting a node in a linked list is faster (O(1)) compared to arrays (O(n)) since there is no need for shifting elements
  • 5.
    Operations on LinkedLists 1.Insertion: • At the beginning. • At the end. • After a specific node. 2. Deletion: • From the beginning. • From the end. • A specific node by value 3. Search: • Locating a node with a specific value.
  • 6.
    Types of LinkedLists 1.SinglyLinked List 2. Doubly Linked List 3. Circular Linked List