

Python Data Structures
Presentation
•
Other
•
University
•
Hard
Alex James
Used 16+ times
FREE Resource
24 Slides • 0 Questions
1
Python Data Structures

2
What is a Data Structure?
Data structure is a way of defining, storing & retrieving of data in a structural & systematic way. A data structure may contain different type of data items.
3
What are linear and non linear data Structures?
Linear: A data structure is said to be linear if its elements form a sequence or a linear list. Examples: Array. Linked List, Stacks and Queues.
Non-Linear: A data structure is said to be non-linear if traversal of nodes is nonlinear in nature. i.e, These are the data structures in which there is no sequential linking of data elements. Any pair or group of data elements can be linked to each other and can be accessed without a strict sequence. Example: Graph and Trees.
4
Linear Data Structures
Array: It is a sequential arrangement of data elements paired with the index of the data element.
Linked List: Each data element contains a link to another element along with the data present in it.
Stack: It is a data structure which follows only to specific order of operation. LIFO(last in First Out) or FILO(First in Last Out).
Queue: It is similar to Stack but the order of operation is only FIFO(First In First Out).
Matrix: It is two dimensional data structure in which the data element is referred by a pair of indices.
5
QUIZ - 1
6
Lab Experiment - 1
7
Quiz - 1
8
Non-Linear Data Structures
Binary Tree: It is a data structure where each data element can be connected to maximum two other data elements and it starts with a root node.
Heap: It is a special case of Tree data structure where the data in the parent node is either strictly greater than/ equal to the child nodes or strictly less than it’s child nodes.
Hash Table: It is a data structure which is made of arrays associated with each other using a hash function. It retrieves values
using keys rather than index from a data element.
Graph: It is an arrangement of vertices and nodes where some of the nodes are connected to each other through link.
9
10
Quiz - 2
11
Lab Experiment - 2
12
Quiz - 2
13
Python Specific Data Structures
These data structures are specific to python language and they give greater flexibility in storing different types of data and faster processing in python environment.
14
List: It is similar to array with the exception that the data elements can be of different data types. You can have both numeric and string data in a python list.
Tuple: Tuples are similar to lists but they are immutable which means the values in a tuple cannot be modified they can only be read.
Dictionary: The dictionary contains Key-value pairs as its data elements.
15
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.
16
17
Basic Operations of Stack
empty() – Returns whether the stack is empty.
size() – Returns the size of the stack.
top() – Returns a reference to the top most element of the stack.
push(g) – Adds the element ‘g’ at the top of the stack.
pop() – Deletes the top most element of the stack.
18
Implementation of Stack
Using Array
Using Linked List
19
Implementation of Stack using Array
Python’s built-in data structure array can be used as a stack.
Instead of push(), append() is used to add elements to the top of stack while pop() removes the element in LIFO order.
20
Implementation of Stack using Linked List
A stack can be easily implemented through the linked list. In stack Implementation, a stack contains a top pointer. which is “head” of the stack where pushing and popping items happens at the head of the list. first node have null in link field and second node link have first node address in link field and so on and last node address in “top” pointer.
21
22
Quiz - 3
23
Lab Experiment -3
24
Quiz - 3
Python Data Structures

Show answer
Auto Play
Slide 1 / 24
SLIDE
Similar Resources on Wayground
20 questions
Present Perfect
Presentation
•
University
20 questions
UNIT 9. COMPARATIVES AND SUPERLATIVES.
Presentation
•
University
20 questions
Forces Mastery Lesson 8.9A
Presentation
•
KG - University
21 questions
IRS 1 - NCF Vision - Mission
Presentation
•
University
17 questions
Statistics
Presentation
•
University
18 questions
IRS 1 - NCF Core Values
Presentation
•
University
19 questions
Common Errors- Subject and Verb Agreement-2
Presentation
•
University
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade
Discover more resources for Other
20 questions
Disney Trivia
Quiz
•
University
10 questions
Spanish Greetings and Goodbyes!
Presentation
•
6th Grade - University
20 questions
Physical or Chemical Change/Phases
Quiz
•
8th Grade - University
39 questions
Unit 7 Key Terms
Quiz
•
11th Grade - University
25 questions
SER and Subject Pronouns
Quiz
•
8th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
19 questions
Key Concepts in Buddhism
Quiz
•
University
0 questions
Cell Domain Basic Review (Biology)
Quiz
•
University