Different types of Linked list.

873 views 15 slides Feb 03, 2023
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

A linked list is a linear data structure where each element (node) is a separate object, connected to the previous and next elements by references. The first element is referred to as the head of the linked list and the last element is referred to as the tail. The nodes in a linked list can store da...


Slide Content

Introduction

Data structure: A data structure is a logical representation of data and operation that can be performed on the data. Types: 1 . L inear data structure . 2 . Non linear data structure . Linear data structure is an order of data elements. They are arrays, stacks, queues, and linked lists.

Limitations of Array’s: Arrays are simple to understand and elements of an array are easily accessible . But arrays have some limitations. 1. Arrays have a fixed dimension. 2. Once the size of an array is decided it can not be increased or decreased during education. 3. Array elements are always stored in a contiguous memory locations. 4. Operations like insertion or deletion of the array are pretty difficult . To over come this limitations we use L inked list.

What is Linked list? Linked list is a linear data structure where elements are not stored sequentially inside the computer memory but they are linked with each other by the help of address.

Linked list: Linked list is a collection of elements called nodes. Each node contains two parts. they are data part and link part. Data Link Node:

Different types of Linked list -

Singly Linked List : It is the simplest type of linked list in which every node contains some data and a pointer to the next node of the same data type. A single linked list allows the traversal of data only in one way.

Algorithm: 1. Create a temporary node(temp) and assign the head node's address. 2. Print the data which present in the temp node. 3. After printing the data, move the temp pointer to the next node. 4. Do the above process until we reach the end.

Operations: 1. Traversal. 2. Insertion. 3. Deletion . 4. Searching .

Doubly Linked List : A doubly linked list is a bi-directional linked list. So, you can traverse it in both directions. Unlike singly linked lists, its nodes contain one extra pointer called the previous pointer. This pointer points to the previous node.

Circular Linked List : While traversing a circular linked list, we can begin at any node and traverse the list in any direction forward and backward until we reach the same node we started. Thus, a circular linked list has no beginning and no end .

Doubly Circular linked list : A circular doubly linked list is a mixture of a doubly linked list and a circular linked list . Like the doubly linked list, it has an extra pointer called the previous pointer, and similar to the circular linked list, its last node points at the head node. This type of linked list is the bi-directional list. So, you can traverse it in both directions.

THANK YOU