Presentation on Linked list and their types and their advantages and Disadvantages
Size: 2.16 MB
Language: en
Added: Jun 16, 2024
Slides: 9 pages
Slide Content
PRESENTATION ON LINK LIST AND TYPES presented by C.s 4th semester Teacher name:
LINKED LIST A linked list is a linear data structure where elements are stored in nodes, and each node points to the next. Types: Singly Linked List Doubly Linked List Circular Linked List
SINGLY LINKED LIST Each node has two fields: data and a reference to the next node. Can only be traversed in one direction (from the head to the last node).
ADVANTAGES AND DISADVATAHES Advantages : Simple to implement Efficient for insertion/deletion at the head or tail (O(1)) Disadvantages : Inefficient for searching (O(n)) One- directional traversal
DOUBLY LINKED LIST Each node has three fields: data, next, and previous references.
ADVANTAGES AND DISADVATAHES Advantages : Bidirectional traversal Easier deletion of a given node Disadvantages : More memory per node (additional pointer) Slightly more complex implementation
CIRCULAR LINKED LIST The last node points back to the first node, forming a circle.
ADVANTAGES AND DISADVATAHES Advantages : Allows bidirectional traversal in a circular manner Useful for circular traversal needs (e.g., round- robin scheduling) Disadvantages : Risk of infinite loops if not managed correctly More memory per node