-
Hajipur, Bihar, 844101
Hajipur, Bihar, 844101
Introduction to Python
Python Basics
Python Syntax
Python Comments
Python Variables
Python Data Types
Python Casting
Python I/O
Python Operators
Cotrol Structures
Data Structures
Python Strings
Python Lists
Python Tuples
Python Dictionaries
Python Sets
Python Arrays
Python Bytes and Bytearray
Date and Time
Functions and Module
File Handling
Python OOP
Advanced Concepts
Python Scope
Python Modules
Python JSON
Python RegEx
Python PIP
Python Try...Except
Python String Formatting
Python User Input
Python VirtualEnv
Python Math
Python DSA
Python DSA
Lists and Arrays
Python Stacks
Python Queues
Linked Lists
Python Hash Tables
Python Trees
Python Binary Trees
Binary Search Trees
Python AVL Trees
Python Graphs
Searching Algorithms
Sorting Algorithms
DSA stands for Data Structures and Algorithms. In Python, DSA helps in solving real-world problems efficiently using organized data and logical problem-solving steps.
Data Structures are ways to store and organize data.
Data Structure | Example Type | Use for |
---|---|---|
List | [] |
Ordered, dynamic collections |
Tuple | () |
Immutable ordered collections |
Set | {} |
Unordered unique items |
Dictionary | {key: value} |
Key-value pairs |
An algorithm is a step-by-step procedure to solve a problem.
Example: A sorting algorithm arranges data in a specific order.
Linear Search
Binary Search
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
A function that calls itself to break problems into subproblems.
Nodes connected in a sequence
Stack → LIFO (Last In, First Out)
Queue → FIFO (First In, First Out)
def linear_search(arr, target):
for i in range(len(arr)):
if arr[i] == target:
return i
return -1
print(linear_search([1, 3, 5, 7], 5)) # Output: 2
def bubble_sort(arr):
n = len(arr)
for i in range(n):
for j in range(n - i - 1):
if arr[j] > arr[j+1]:
arr[j], arr[j+1] = arr[j+1], arr[j]
return arr
print(bubble_sort([5, 1, 4, 2, 8])) # Output: [1, 2, 4, 5, 8]
Q1. Write a Python program to create a list of numbers and search for a specific number using a loop.
Q2. Write a Python program to create a function that reverses a string using a stack.
Q3. Write a Python program to create a dictionary with student names as keys and their marks as values.
Q4. Write a Python program to implement bubble sort on a list of integers.
Q5. Write a Python program to use a tuple to store a date of birth (day, month, year).
Q6. Write a Python program to insert and remove elements from a queue using a list.
Q7. Write a Python program to implement factorial using recursion.
Q8. Write a Python program to use binary search to find an element in a sorted list.
Q9. Write a Python program to create a set of unique cities visited and display them.
Q10. Write a Python program to manually traverse a linked list structure using class and objects.
Introduction to Python
Python Basics
Python Syntax
Python Comments
Python Variables
Python Data Types
Python Casting
Python I/O
Python Operators
Cotrol Structures
Data Structures
Python Strings
Python Lists
Python Tuples
Python Dictionaries
Python Sets
Python Arrays
Python Bytes and Bytearray
Date and Time
Functions and Module
File Handling
Python OOP
Advanced Concepts
Python Scope
Python Modules
Python JSON
Python RegEx
Python PIP
Python Try...Except
Python String Formatting
Python User Input
Python VirtualEnv
Python Math
Python DSA
Python DSA
Lists and Arrays
Python Stacks
Python Queues
Linked Lists
Python Hash Tables
Python Trees
Python Binary Trees
Binary Search Trees
Python AVL Trees
Python Graphs
Searching Algorithms
Sorting Algorithms