0% found this document useful (0 votes)
66 views33 pages

53 Data Structure

Uploaded by

mdafsarurdu90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views33 pages

53 Data Structure

Uploaded by

mdafsarurdu90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

(BPSC + STET) Computer Science

Welcome Everyone Arora Educator


“Arora Educator” Official Platform
By : Sachin Arora Sir
Founder : AE (Arora Educator)
WhatsApp : 97 606 89 846
Arora Educator
Arora Educator : Stay Connected
YouTube Channel Link –
https://www.youtube.com/@AroraEducator/
Telegram Link –
https://t.me/AroraEducatorChannel
Instagram Link –
https://www.instagram.com/aroraeducator.official/
Arora Educator App Link –
https://play.google.com/store/apps/details?id=co.stan.xsjqp
Data Structure Arora Educator
Data Structure Arora Educator
Data Structure Arora Educator
Primitive data structures are simple Arora Educator
and predefined

Non-primitive data structures are


more complex and can be user-
defined.
Arora Educator
Topic : Linked List
Arora Educator
Topic : Linked List
Arora Educator
Linked List
✓ Linked list elements can be stored anywhere
in the memory or randomly stored. (Not like
array)
✓ Array has Static Memory, Linked List has
Dynamic Memory.
✓ Array memory allocated at compile time, in
Linked List memory is allocated at run time.
Arora Educator
Linked List
✓ In Linked list access is = Sequential
(traversed starting from the head node
until the end of the list)
✓ In Array access is = Random
Arora Educator
Linked List
✓ Linked List is Dynamic data Structure .
✓ Linked List can grow and shrink during
run time.
✓ Insertion and Deletion Operations are
Easier.
✓ Efficient Memory Utilization ,i.e no
need to pre-allocate memory.
✓ A linked list can be used to implement
a queue & stack.
Arora Educator
Linked List
✓ A linked list is a dynamic data
structure.
✓ Here each element called a = node
✓ Node is made of 2 items = data +
reference (pointer)
✓ A linked list is a collection of nodes
where each node is connected to
the next node through a pointer.
Arora Educator
Linked List
✓ In a circular linked list = There is no
beginning and no end.
✓ In linked list each node contain minimum
of two fields. One field is data field to store
the data second field is = Pointer to node
✓ A variant of the linked list in which none of
the node contains NULL pointer is =
Circular linked list
Arora Educator
Linked List
✓ Generally a collection of node is called
= Linked List
✓ A linear collection of data element
given by mean of pointer is called =
Linked List
Arora Educator
Linked List
✓ To overcome insertion deletion and
static memory allocation problem
of array we use Linked List.
✓ The last node of the list contains a
pointer to the null.
Arora Educator
Linked List
✓ In Linked List = Memory is allocated
at run time.
Arora Educator
Types of Linked List = 4
1. Singly linked list / One way chain
2. Doubly linked list / Two way chain
3. Circular linked list
4. Circular doubly linked list
Arora Educator
Implementation
1. Singly linked list = Hash Tables
2. Doubly linked list = Undo/Redo Operation
3. Circular linked list = Allocating CPU to resource
(Round Robin)
4. Circular doubly linked list
1. Singly Linked List – Arora Educator
✓ Each node has data and a pointer to
the next node.
✓ Singly linked list can be traversed
only in one direction
2. Doubly Linked List – Arora Educator
✓ We add a pointer to the previous node
in a doubly-linked list.
✓ Thus, we can go in either direction:
forward or backward.
2. Doubly Linked List – Arora Educator
3. Circular Linked List – Arora Educator
✓ In this last element is linked to the first
element.
✓ This forms a circular loop.
✓ Last element not points to null
✓ Last element points to head
4. Circular Doubly Linked List – Arora Educator
✓ Here each node is connected to both its
previous and next nodes, and the last
node links back to the first node
Q.1. A linear collection of data elements where the
linear node is given by means of pointer is called?
1) Linked list Arora Educator
2) Node list
3) Primitive list
4) Unordered list
5) All of these
Q.2. In linked list each node contains a minimum of
two fields. One field is data field to store the data
second field is.? Arora Educator

1) Pointer to character
2) Pointer to integer
3) Pointer to node
4) Node
5) More than one of the above
Q.3. Linked list is considered as an example of _______
type of memory allocation.? Arora Educator
1) Dynamic
2) Static
3) Compile time
4) Heap
5) All of these
Q.4. In Linked List implementation, a node carries
information regarding.? Arora Educator
1) Data
2) Link
3) Data and Link
4) Node
5) 1,2 & 4
Q.5. Which of the following application makes use of a
circular linked list.? Arora Educator
1) Undo operation in a text editor
2) Recursive function calls
3) Allocating CPU to resources
4) Implement Hash Tables
5) All of these
Q.6. ______ is When START=NULL in Linked List.?
Arora Educator
1) Housefull
2) Overflow
3) Underflow
4) Saturated
5) All of these
Q.7. The First Link of the Node of the List is.?
Arora Educator
1) Tail
2) Head
3) Initiator
4) Terminator
5) All of these
Q.8. What is the Extra Element Known as at the Head
of the Node of the Linked List.? Arora Educator
1) Bantinel
2) Cantinel
3) Sentinel
4) Both (1) and (2)
5) Both (2) and (3)
Sentinel node = Arora Educator
✓ It is a dummy node in a linked list that
doesn't contain any data
Arora Educator
Arora Educator : Stay Connected
YouTube Channel Link –
https://www.youtube.com/@AroraEducator/
Telegram Link –
https://t.me/AroraEducatorChannel
Instagram Link –
https://www.instagram.com/aroraeducator.official/
Arora Educator App Link –
https://play.google.com/store/apps/details?id=co.stan.xsjqp

You might also like