Department of Computer Science and Engineering (CSE)
UNIVERSITY INSTITUTE OF
ENGINEERING
COMPUTER SCIENCE ENGINEERING
Bachelor of Engineering
Design and Analysis of
Algorithms(CSH-311/ITH-311)
Linked Lists (One –way, Two-way and circular Two-way)
(CO2)
Topic: Linked List DISCOVER . LEARN . EMPOWER
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Learning Objectives & Outcomes
Objective:
• To understand the use of linked list and its types
• Also understand operation performed on linked list.
Outcome:
• Student will understand
Linked list and operation performed on linked list
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Link List
A linked list is a linear data structure, in which the elements
are not stored at contiguous memory locations. The elements
in a linked list are linked using pointers as shown in the below
image:
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Representation
•A linked list is represented by a pointer to the first node of
the linked list. The first node is called the head. If the linked
list is empty, then the value of the head is NULL.
•Each node in a list consists of at least two parts:
1) data
2) Pointer (Or Reference) to the next node
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Singly Linked List
• Singly linked lists contain nodes which have a data part as well as
an address part i.e. next, which points to the next node in the sequence of
nodes.
• The operations we can perform on singly linked lists
are insertion, deletion and traversal.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Doubly Linked List
• In a doubly linked list, each node contains a data part
and two addresses, one for the previous node and one
for the next node.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Circular Linked List
• In circular linked list the last node of the list holds the
address of the first node hence forming a circular chain
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
REFERENCES
Text books:
•Cormen, Leiserson, Rivest, Stein, “Introduction to Algorithms”, Prentice Hall of
India, 3rd edition 2012. problem, Graph coloring.
•Horowitz, Sahni and Rajasekaran, “Fundamentals of ComputerAlgorithms”,
University Press (India), 2nd edition
Websites:
1.https://www.geeksforgeeks.org/data-structures/linked-list/
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Summary
Introduction to Link List
• Representation
Types of Link List
• Single LL
• Double LL
• Circular LL
University Institute of Engineering (UIE)
THANK YOU
University Institute of Engineering (UIE)