SlideShare a Scribd company logo
3
Most read
4
Most read
5
Most read
Python Data
Structures and
Algorithms
Presented by-
Shreyas Lawand
PRN-2143110072
Agenda
• Inbuilt Data Structures
• List
• Dictionary
• Tuple
• Set
• User Defined Data Structures
• Linked List
• Stack
• Queue
• Tree
• Hash Map
• Algorithms
Inbuilt Data Structures
List
s
• Lists are used to store multiple
items in a single variable.
• List items are ordered,
changeable, and allow duplicate
values.
• List items are indexed, the first
item has index [0], the second
item has index [1] etc.
• Eg.
Dictionary
• Dictionaries are written with
curly brackets, and have keys
and values.
• Eg.
• Dictionaries are used to store
data values in key:value
pairs.
• A dictionary is a collection
which is ordered*,
changeable and do not allow
duplicates.
Tuple
• Tuples are used to store multiple
items in a single variable.
• Tuple items are ordered,
unchangeable, and allow duplicate
values.
• Tuple items are indexed, the first
item has index [0], the second item
has index [1] etc.
• A tuple is a collection which is
ordered and unchangeable.
• Tuples are written with round
brackets.
• Eg.
Sets
• Sets are used to store
multiple items in a single
variable.
• A set is a collection which is
unordered, unchangeable*,
and unindexed.
• Sets are written with curly
brackets.
• Eg.
User Defined Data Structures
Linked
List
Linked List is a linear data structure. Unlike arrays, linked list elements
are not stored at a contiguous location; the elements are linked using
pointers. They include a series of connected nodes. Here, each node
stores the data and the address of the next node.
Stack
A stack is a linear data structure that stores items in a Last-In/First-Out (LIFO)
or First-In/Last-Out (FILO) manner. In stack, a new element is added at one end
and an element is removed from that end only. The insert and delete operations
are often called push and pop.
Queue
Like stack, queue is a linear data structure that stores items in First In First Out
(FIFO) manner. With a queue the least recently added item is removed first. A
good example of queue is any queue of consumers for a resource where the
consumer that came first is served first.
Tree
Tree represents the nodes connected by edges. It is a non-linear data structure. It has the
following properties −
• One node is marked as Root node.
• Every node other than the root is associated with one parent node.
• Each node can have an arbiatry number of chid node.
Hash Map
Hash maps are indexed data structures. A hash map makes use of a hash function to
compute an index with a key into an array of buckets or slots. Its value is mapped to the
bucket with the corresponding index. The key is unique and immutable. Think of a hash
map as a cabinet having drawers with labels for the things stored in them. For example,
storing user information- consider email as the key, and we can map values
corresponding to that user such as the first name, last name etc to a bucket.
• Algorithm is a step-by-step procedure, which defines a set of instructions to be executed
in a certain order to get the desired output. Algorithms are generally created
independent of underlying languages, i.e. an algorithm can be implemented in more
than one programming language.
• From the data structure point of view, following are some important categories of
algorithms −
• Search − Algorithm to search an item in a data structure.
• Sort − Algorithm to sort items in a certain order.
• Insert − Algorithm to insert item in a data structure.
• Update − Algorithm to update an existing item in a data structure.
• Delete − Algorithm to delete an existing item from a data structure.
Algorithm
s
Certificate

More Related Content

PPTX
Data Structures in Python
Devashish Kumar
 
PPTX
Guided And Unguided Media
Rajesh Yadav
 
PPTX
Functions in python slide share
Devashish Kumar
 
PPT
ARTIFICIAL INTELLIGENCE.PPT
vandana gandhi
 
PDF
An Introduction to Generative AI
Cori Faklaris
 
PPTX
Python-Inheritance.pptx
Karudaiyar Ganapathy
 
PPTX
Difference between File system And DBMS.pptx
ShayanMujahid2
 
PDF
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 
Data Structures in Python
Devashish Kumar
 
Guided And Unguided Media
Rajesh Yadav
 
Functions in python slide share
Devashish Kumar
 
ARTIFICIAL INTELLIGENCE.PPT
vandana gandhi
 
An Introduction to Generative AI
Cori Faklaris
 
Python-Inheritance.pptx
Karudaiyar Ganapathy
 
Difference between File system And DBMS.pptx
ShayanMujahid2
 
AD3251-Data Structures Design-Notes-Searching-Hashing.pdf
Ramco Institute of Technology, Rajapalayam, Tamilnadu, India
 

What's hot (20)

PPTX
Datastructures in python
hydpy
 
PPT
Heaps
Hafiz Atif Amin
 
PPTX
Tuple in python
Sharath Ankrajegowda
 
PPTX
Presentation on queue
Rojan Pariyar
 
PPTX
linked list in data structure
shameen khan
 
PPTX
Infix to postfix conversion
Then Murugeshwari
 
PPTX
Looping statement in python
RaginiJain21
 
PPTX
Python array
Arnab Chakraborty
 
PPTX
Basics of Object Oriented Programming in Python
Sujith Kumar
 
PPSX
Data Structure (Queue)
Adam Mukharil Bachtiar
 
PPTX
Packages In Python Tutorial
Simplilearn
 
PPT
Data structures using c
Prof. Dr. K. Adisesha
 
PPTX
single linked list
Sathasivam Rangasamy
 
PPT
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
PPTX
Sorting
Ashim Lamichhane
 
PPTX
Python dictionary
eman lotfy
 
PDF
Php array
Nikul Shah
 
PPTX
Hashing
Amar Jukuntla
 
PDF
Python exception handling
Mohammed Sikander
 
Datastructures in python
hydpy
 
Tuple in python
Sharath Ankrajegowda
 
Presentation on queue
Rojan Pariyar
 
linked list in data structure
shameen khan
 
Infix to postfix conversion
Then Murugeshwari
 
Looping statement in python
RaginiJain21
 
Python array
Arnab Chakraborty
 
Basics of Object Oriented Programming in Python
Sujith Kumar
 
Data Structure (Queue)
Adam Mukharil Bachtiar
 
Packages In Python Tutorial
Simplilearn
 
Data structures using c
Prof. Dr. K. Adisesha
 
single linked list
Sathasivam Rangasamy
 
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
Python dictionary
eman lotfy
 
Php array
Nikul Shah
 
Hashing
Amar Jukuntla
 
Python exception handling
Mohammed Sikander
 
Ad

Similar to Python Data Structures and Algorithms.pptx (20)

PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
workspaceabhishekmah
 
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
workspaceabhishekmah
 
PPTX
Standard template library
Sukriti Singh
 
PPT
lecture 02.2.ppt
NathanielAdika
 
PPTX
Introduction to data structures (ss)
Madishetty Prathibha
 
PPTX
ds bridge.pptx
GOOGLEINTERNETCAFE1
 
PPT
Unit 1.ppt
Minakshee Patil
 
PPTX
ALGORITHM ANALYSIS AND LISTS ABSTACTS DT
mohanrajm63
 
PDF
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
Sowmya Jyothi
 
PPT
Fundamentals of data structure syallabus
kashvigoyal020106
 
PPT
DS.ppt Datatastructures notes presentation
SakkaravarthiShanmug
 
PPT
1.2 Kernel Data Structures.ppt
AKILARANIM
 
PPTX
unit 1.pptx for advanced cloud computing unit
akastiyan23
 
PPTX
Data structures
MADHAVASAIYENDUVA
 
PPTX
Stack and Queue......................pptx
tinotendamcbern91
 
PPTX
Data structure chapter 1.pptx
Kami503928
 
PPTX
Unit 2 linear data structures
Senthil Murugan
 
PPTX
stack.pptx
mayankKatiyar17
 
PPTX
DS Module 1.pptx
SaralaT3
 
PPTX
Lecture 2 - Linear Data Structures & Implementation.pptx
michaelsayuni29
 
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
workspaceabhishekmah
 
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
workspaceabhishekmah
 
Standard template library
Sukriti Singh
 
lecture 02.2.ppt
NathanielAdika
 
Introduction to data structures (ss)
Madishetty Prathibha
 
ds bridge.pptx
GOOGLEINTERNETCAFE1
 
Unit 1.ppt
Minakshee Patil
 
ALGORITHM ANALYSIS AND LISTS ABSTACTS DT
mohanrajm63
 
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
Sowmya Jyothi
 
Fundamentals of data structure syallabus
kashvigoyal020106
 
DS.ppt Datatastructures notes presentation
SakkaravarthiShanmug
 
1.2 Kernel Data Structures.ppt
AKILARANIM
 
unit 1.pptx for advanced cloud computing unit
akastiyan23
 
Data structures
MADHAVASAIYENDUVA
 
Stack and Queue......................pptx
tinotendamcbern91
 
Data structure chapter 1.pptx
Kami503928
 
Unit 2 linear data structures
Senthil Murugan
 
stack.pptx
mayankKatiyar17
 
DS Module 1.pptx
SaralaT3
 
Lecture 2 - Linear Data Structures & Implementation.pptx
michaelsayuni29
 
Ad

Recently uploaded (20)

PPTX
Practice Questions on recent development part 1.pptx
JaspalSingh402
 
PPTX
Module_II_Data_Science_Project_Management.pptx
anshitanarain
 
PPTX
Ship’s Structural Components.pptx 7.7 Mb
abdalwhab7327
 
PDF
Traditional Exams vs Continuous Assessment in Boarding Schools.pdf
The Asian School
 
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
sangeethamtech26
 
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Dr. Rahul Kumar
 
PDF
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
PDF
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
PDF
Chad Ayach - A Versatile Aerospace Professional
Chad Ayach
 
PPTX
TE-AI-Unit VI notes using planning model
swatigaikwad6389
 
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
quakeplayz54
 
PPTX
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
ghousebhasha2007
 
PDF
flutter Launcher Icons, Splash Screens & Fonts
Ahmed Mohamed
 
PPTX
The-Looming-Shadow-How-AI-Poses-Dangers-to-Humanity.pptx
shravanidabhane8
 
PDF
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
demidovs1
 
PDF
오픈소스 LLM, vLLM으로 Production까지 (Instruct.KR Summer Meetup, 2025)
Hyogeun Oh
 
PPTX
anatomy of limbus and anterior chamber .pptx
ZePowe
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
dodultrongaming
 
Practice Questions on recent development part 1.pptx
JaspalSingh402
 
Module_II_Data_Science_Project_Management.pptx
anshitanarain
 
Ship’s Structural Components.pptx 7.7 Mb
abdalwhab7327
 
Traditional Exams vs Continuous Assessment in Boarding Schools.pdf
The Asian School
 
Strings in CPP - Strings in C++ are sequences of characters used to store and...
sangeethamtech26
 
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Dr. Rahul Kumar
 
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
Chad Ayach - A Versatile Aerospace Professional
Chad Ayach
 
TE-AI-Unit VI notes using planning model
swatigaikwad6389
 
Lesson 3_Tessellation.pptx finite Mathematics
quakeplayz54
 
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
ghousebhasha2007
 
flutter Launcher Icons, Splash Screens & Fonts
Ahmed Mohamed
 
The-Looming-Shadow-How-AI-Poses-Dangers-to-Humanity.pptx
shravanidabhane8
 
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
demidovs1
 
오픈소스 LLM, vLLM으로 Production까지 (Instruct.KR Summer Meetup, 2025)
Hyogeun Oh
 
anatomy of limbus and anterior chamber .pptx
ZePowe
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
dodultrongaming
 

Python Data Structures and Algorithms.pptx

  • 1. Python Data Structures and Algorithms Presented by- Shreyas Lawand PRN-2143110072
  • 2. Agenda • Inbuilt Data Structures • List • Dictionary • Tuple • Set • User Defined Data Structures • Linked List • Stack • Queue • Tree • Hash Map • Algorithms
  • 3. Inbuilt Data Structures List s • Lists are used to store multiple items in a single variable. • List items are ordered, changeable, and allow duplicate values. • List items are indexed, the first item has index [0], the second item has index [1] etc. • Eg.
  • 4. Dictionary • Dictionaries are written with curly brackets, and have keys and values. • Eg. • Dictionaries are used to store data values in key:value pairs. • A dictionary is a collection which is ordered*, changeable and do not allow duplicates.
  • 5. Tuple • Tuples are used to store multiple items in a single variable. • Tuple items are ordered, unchangeable, and allow duplicate values. • Tuple items are indexed, the first item has index [0], the second item has index [1] etc. • A tuple is a collection which is ordered and unchangeable. • Tuples are written with round brackets. • Eg.
  • 6. Sets • Sets are used to store multiple items in a single variable. • A set is a collection which is unordered, unchangeable*, and unindexed. • Sets are written with curly brackets. • Eg.
  • 7. User Defined Data Structures Linked List Linked List is a linear data structure. Unlike arrays, linked list elements are not stored at a contiguous location; the elements are linked using pointers. They include a series of connected nodes. Here, each node stores the data and the address of the next node.
  • 8. Stack A stack is a linear data structure that stores items in a Last-In/First-Out (LIFO) or First-In/Last-Out (FILO) manner. In stack, a new element is added at one end and an element is removed from that end only. The insert and delete operations are often called push and pop.
  • 9. Queue Like stack, queue is a linear data structure that stores items in First In First Out (FIFO) manner. With a queue the least recently added item is removed first. A good example of queue is any queue of consumers for a resource where the consumer that came first is served first.
  • 10. Tree Tree represents the nodes connected by edges. It is a non-linear data structure. It has the following properties − • One node is marked as Root node. • Every node other than the root is associated with one parent node. • Each node can have an arbiatry number of chid node.
  • 11. Hash Map Hash maps are indexed data structures. A hash map makes use of a hash function to compute an index with a key into an array of buckets or slots. Its value is mapped to the bucket with the corresponding index. The key is unique and immutable. Think of a hash map as a cabinet having drawers with labels for the things stored in them. For example, storing user information- consider email as the key, and we can map values corresponding to that user such as the first name, last name etc to a bucket.
  • 12. • Algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output. Algorithms are generally created independent of underlying languages, i.e. an algorithm can be implemented in more than one programming language. • From the data structure point of view, following are some important categories of algorithms − • Search − Algorithm to search an item in a data structure. • Sort − Algorithm to sort items in a certain order. • Insert − Algorithm to insert item in a data structure. • Update − Algorithm to update an existing item in a data structure. • Delete − Algorithm to delete an existing item from a data structure. Algorithm s