26 free guides covering Python data structures and algorithms from arrays to maximum flow. Practical Python code, clear explanations, and complexity analysis — built for engineers who want to understand DSA deeply, not just memorise patterns.
Big O notation, complexity analysis, and the vocabulary every DSA learner needs.
What are data structures and algorithms, why they matter, and how Python maps to classic DSA concepts.
Big O notation from O(1) to O(n!), how to analyse code, space complexity, and a complete cheat sheet.
Best, average, and worst case analysis, comparing algorithms, and how to reason about code performance.
Arrays, linked lists, stacks, queues, hash tables, and trees — with Python code for every operation.
Python lists as dynamic arrays: access, iteration, insertion, deletion, and time complexity for every operation.
Singly linked lists in Python: Node class, traversal, insert at head and tail, delete by value, and comparison with arrays.
LIFO stacks using Python lists, a Stack class, and classic applications including balanced bracket checking.
FIFO queues with collections.deque, why not to use list.pop(0), Queue class, and introduction to priority queues.
How hash functions work, collision resolution with chaining and open addressing, Python dict internals, and load factor.
Python sets for O(1) membership testing, set operations (union, intersection, difference), frozenset, and interview patterns.
Tree terminology, TreeNode class, in-order / pre-order / post-order / level-order traversals with Python code.
BST property, recursive insertion and search, deletion with three cases, and why unbalanced trees degrade to O(n).
Self-balancing BSTs: balance factor, four rotation types (LL/LR/RL/RR), AVL insertion with Python code.
Graph representations, BFS and DFS traversal with full Python implementations.
Linear and binary search with Python code, complexity analysis, and when to choose each.
Sequential scan algorithm, Python implementation with enumerate, when linear beats binary search, O(n) complexity analysis.
Iterative and recursive Python implementations, off-by-one pitfalls, bisect module, and left/right boundary variants.
Seven sorting algorithms from O(n²) basics to O(n log n) and beyond — all with Python implementations.
Adjacent-swap sorting, early-exit optimisation, step-by-step trace, O(n²) worst / O(n) best complexity.
Find-minimum selection, in-place sorting, fewer swaps than bubble sort, always O(n²) with no early-exit.
Build-sorted-subarray approach, playing cards analogy, O(n) best case on nearly-sorted data, why Python uses Timsort.
Divide-and-conquer splitting and merging, stable sort guarantee, O(n log n) always, O(n) extra space trade-off.
Pivot selection, Lomuto partition scheme, random pivot to avoid O(n²) on sorted input, O(log n) call stack.
Non-comparison integer sort, count array with prefix sums for stability, O(n+k) complexity, and when k≫n makes it worse.
LSD and MSD radix sort, counting sort as a stable subroutine per digit, O(nk) complexity for fixed-width integers.
Shortest path, minimum spanning tree, and maximum flow — the advanced graph algorithms every engineer should know.
Dijkstra’s algorithm with Python heapq, Bellman-Ford for negative weights, step-by-step trace, and algorithm comparison.
Kruskal’s with Union-Find (path compression, union by rank) and Prim’s with heapq — both Python implementations.
Flow networks, Edmonds-Karp BFS-based Ford-Fulkerson, residual graph, augmenting paths, and practical applications.