
Learn data structures and algorithms in Python through theory and hands-on implementation. Explore recursion, stacks, queues, linked lists, trees, graphs, and sorting to prepare for interviews.
Adjust playback speed with the speed control to match your pace, and use the Q&A and notes features to engage with the data structures and algorithms course.
Discover why data structures matter: they store data efficiently in memory and enable fast algorithmic access, using linear forms (stacks, queues) and non-linear forms (trees, graphs).
Learn to print output, use strings and numbers, declare variables, follow Python naming rules, and explore basic data types including numbers, sequences, sets, mapping, and none.
Learn about Python numbers: integers, floats, complex, and booleans. Integers are unbounded by memory; floats use decimals and exponents; complex numbers reveal real and imaginary parts via .real and .imag.
Understand Python's boolean data type, where true and false arise from comparisons and booleans are a subclass of integers, and recognize the none type as a single object representing null.
Explore Python conditional control statements—if, if-else, and elif—discover how conditions evaluate to true or false, how indentation defines blocks, and how to handle multiway branches.
Learn how Python for loop can include an optional else clause that runs only after normal termination, unless a break occurs, with a vowel check example.
Explore how while loops behave with break, continue, and pass statements in Python, including terminating loops, skipping iterations, and handling user input for sums and controlled execution.
Learn how Python's while loop with an optional else clause behaves, terminating normally or via break, illustrated by a vowel-check example.
Create tuples with parentheses and access elements using index and negative index. Inspect type and length, and concatenate tuples with the plus operator, while noting immutability prevents modification or deletion.
Explore how Python dictionaries function as associative data structures with unique, immutable keys mapping to mutable or immutable values, and learn to create, access, update, and delete elements.
Discover Python functions, including built in and user defined; define with def, call with parameters, and return values for reusable code.
Learn to define and call user defined functions in Python using def, parameters, and return values, with examples of display, addition, and multiplication.
Explore Python built-in modules like math, random, time, and threading, and inspect their members with dir. Learn various import styles, including import, from import, aliases, and using qualified names.
Create Python modules containing functions, name them in lowercase, and import them into a main program. Use module namespaces to call functions, illustrating modular design and code reuse.
Time and Space Complexity
Explore the order of growth by classifying algorithms as input size grows, from constant and logarithmic to linear, quadratic, cubic, and exponential, including divide-and-conquer and asymptotic analysis.
Explore big O notation by showing F(n) is bounded above by C times G(n) for large n. Note examples where f(n)=5n+4 is O(n) and f(n)=5n^4+3n^3+2n^2+4n+1 is O(n^4).
Understand the big omega notation and its lower bound concept, showing that f(n) equals five n plus four is omega of n as n grows, with a positive constant factor.
Explore asymptotic notations and their meanings, including big o, big omega, and theta, and emphasize worst-case performance for algorithms. Illustrate linear search complexities and order-of-growth classifications from constant to exponential.
Explore space complexity by analyzing memory usage and bytes across data types, arrays, and two-dimensional arrays, with examples calculating total memory in algorithms.
Uncover how to solve the recurrence t(n)=t(n-1)+n via substitution, expanding until n, derive the sum of first n natural numbers, and conclude a quadratic time complexity O(n^2).
Explore tail recursion and head recursion with practical examples, showing how calling order affects output 16, 9, 4, 1 vs 1, 4, 9, 16, and introduce tree and indirect recursion.
Explore indirect recursion, where multiple functions call each other in a circular pattern with a base condition. Analyze how the call sequence and base conditions determine the time complexity.
Define a recursive Python function sum_rec to compute the sum of N natural numbers, with a base case of zero, input handling, and printing the result.
Explore the factorial concept by defining fact(n) as 1 to n, derive the recurrence fact(n)=fact(n-1)*n with base case fact(0)=1, and compare the recursive and iterative approaches with linear time.
Learn the iterative binary search on a sorted array. Compare the key to the middle element, narrow to the left or right half, and return the index or not found.
Implement a recursive binary search in Python with a function binary_search_recursive(a, key, l, r). The example searches 84, returning index 3, and 17, returning -1, on a sorted list.
Explore stable and unstable sorting by examining how duplicates affect relative ordering. See why stable sorts preserve the original sequence, especially when sorting objects by salary while keeping name order.
Write a Python function insertion_sort to sort a list using insertion sort with a for loop and while loop. Demonstrate with a sample array and print original and sorted sequences.
Implement bubble sort in Python by defining a bubblesort function, using a list, nested loops, and swaps, then print the original and sorted arrays while noting its time complexity.
Learn to implement shell sort in Python by writing a shellsort function, using gap-based insertion with while loops, shifting elements, and verifying with a sample array.
Explore the quicksort algorithm through a divide-and-conquer approach, using a partition step with a pivot and i and j pointers to sort subarrays recursively.
Implement quicksort in Python by defining quicksort and partition functions, using low and high indices and a pivot. Demonstrate with a sample array, showing original and sorted results.
implement count sort in python by defining a count_sort function, building a count array from the input, and reconstructing the sorted list with the counts.
Define a Python node class with element and next using slots for memory efficiency, initialize with __init__, and link nodes to form a list.
Learn to insert an element at the beginning of a linked list using the at first method, creating a newest node and updating head. It runs in O(1) time.
Implement the add first method in a linked list using Python, handling empty and non-empty cases, updating head, tail, and size while demonstrating insertions at the beginning.
Learn to insert an element at any position in a linked list with the add_any method, updating head and next pointers and increasing the list size through concrete examples.
Remove the first element of a linked list by updating head to head.next, adjusting tail when needed, and returning the deleted value in unit time.
Implement a remove first method to delete the first element of a linked list, update head and size, handle empty lists, and reset tail when needed.
Explore circular linked list data structures, where the last node points back to the head, creating a continuous cycle and eliminating a true beginning or end.
Learn to implement a circular linked list in Python by building a class with head, tail, and size; add nodes at the end and display the list.
Create a doubly linked list by adding nodes with at last, updating head and tail, and linking prev and next references. Handle empty lists and emphasize O(1) insertion time.
Implement the add_first method in Python to insert an element at the beginning of a doubly linked list. It handles empty and non-empty cases and updates head, tail, and size.
Implement the add any method to insert an element at any arbitrary position in a doubly linked list, updating next and prev pointers and increasing the list size.
Implement the remove last method to delete the end element of a doubly linked list in Python, updating tail, prev and next, and the size while handling empty lists.
Explore the stack data structure, its last-in, first-out behavior, push and pop operations, and practical applications such as browser history, undo, and expression evaluation.
Implement stacks using a linked list in Python, defining a node class and a stacks linked class with push, pop, top, is_empty, and display, tracking top and size.
Learn how the queue data structure follows first in, first out, with enqueue and dequeue operations, front and rear ends, and ADT methods such as first, length, and is_empty.
Learn to implement queues with Python arrays, supporting enqueue, dequeue, is empty, and front operations via a custom queue class backed by a list.
Implement a first in, first out queue using Python lists by building a queue class with init, length, is_empty, enqueue, dequeue, and first operations.
Discover the double ended queue (deque) data structure, enabling insertion and deletion at both the front and rear ends with first, last, remove first, remove last, and is empty operations.
Understand how heights and levels define a tree, where level counts nodes on the path from root starting at 1 and height counts edges starting at 0.
Learn the degree of a node, defined as its number of children, with examples from root to leaves, and understand that the tree's degree is the maximum node degree.
Explore binary tree representations with arrays, storing nodes in level-order starting at index one, sizing by height, left child 2*i and right child 2*i+1, and inferring parents by floor division.
Create a binary tree in Python using linked nodes with element, left, and right, using slots and an init method, and build trees with a make_tree function.
Create and traverse binary trees using a six-node example, building leaf and internal nodes, assigning left and right subtrees, and performing inorder, preorder, and postorder traversals in Python.
Learn to count nodes in a binary tree using a recursive function that sums the left and right subtree counts and adds one for the root.
Define a recursive height function for a binary tree that compares left and right subtree heights and returns the greater plus one. Subtract one to obtain the actual height.
This course will help you in better understanding of the basics of Data Structures and how algorithms are implemented in Python. This course consists of Videos which covers the theory concepts + implementation in python.
There’s tons of concepts and content in this course:
Basics of data structures & Algorithms
Analysis of Algorithms (Big O, Time and Space complexity)
Recursion & Analysis of Recursive Algorithms
Searching Algorithms
Sorting Algorithms
Linked List
Stacks
Queues
Binary Trees
Binary Search Trees
Balanced Binary Search Trees
Priority Queues and Heaps
Hashing
Graphs
Graph Traversal Algorithms
Followed by Advanced Topics of Algorithms:
Sets and Disjoint Sets
Divide and Conquer Approach - Introduction
Divide and Conquer - Binary Search
Divide and Conquer - Finding Maximum and Mininum
Divide and Conquer - Merge Sort
Divide and Conquer - Quick Sort
Divide and Conquer - Selection Algorithm
Divide and Conquer - Strassens Matrix Multiplication
Divide and Conquer - Closest Pair
Divide and Conquer - Convex Hull
Greedy Method - Introduction
Greedy Method - Knapsack Problem
Greedy Method - Job Sequencing with Deadlines
Greedy Method - Mininum Cost Spanning Tree (Prim's & Kruskal's Algorithms)
Greedy Method - Optimal Storage on Trees
Greedy Method - Optimal Merge Pattern
Greedy Method - Single Source Shortest Path (Dijkstra's Algorithm)
Dynamic Programming - Introduction
Dynamic Programming - Multistage Graphs
Dynamic Programming - All Pairs Shortest Path
Dynamic Programming - Single Source Shortest Path
Dynamic Programming - Optimal Binary Search Trees
Dynamic Programming - 0/1 Knapsack Problem
Dynamic Programming - Reliability Design
Dynamic Programming - Travelling Salespersons Problem
Backtracking - Introduction
Backtracking - n-Queesn Problem
Backtracking - Sum of Subsets Problem
Backtracking - Graph Coloring Problem
Backtracking - Hamiltonian Cycles Problem
Backtracking - 0/1 Knapsack Problem
Branch & Bound - Introduction
Branch & Bound - n-Queens Problem
Branch & Bound - Job Sequencing Problem
Branch & Bound - 0/1 Knapsack Problem
Again, each of these sections includes detailed videos tutorial.