Algorithms
Asymptotic notation, Master theorem, sorting, greedy, dynamic programming & graph algorithms.
Published Study Notes & Chapters (9)
Asymptotic Notation & Master Theorem for Divide-and-Conquer
Big-O, Omega, Theta bounds and solving divide-and-conquer recurrences in under 30 seconds.
Shortest Path & MST Algorithms: Dijkstra, Bellman-Ford, Prim & Kruskal
Edge relaxation, negative edge traps, Disjoint-Set Union Kruskal complexity, and MST uniqueness theorem.
Dynamic Programming Masterclass: 0/1 Knapsack, LCS & Matrix Chain Multiplication
Optimal substructure & overlapping subproblems, exact DP recurrences, time/space complexities, and pseudo-polynomial complexity of 0/1 Knapsack.
Sorting Bounds, Stability, Inversions & P / NP / NP-Complete Reductions
Decision-tree Omega(n log n) lower bound, stability & in-place comparison table, counting array inversions, and polynomial-time Karp reductions (P, NP, NP-Hard, NP-Complete).
Famous Sorting Algorithms (Animated): Bubble, Selection, Insertion, Merge, Quick & Heap Sort
Interactive animated traces, exact comparison/swap counts, inversion bounds, Lomuto vs Hoare QuickSort partitioning, Merge Sort divide-and-conquer, and O(n) Build-Heap proof.
Non-Comparison Linear Sorting (Counting, Radix, Bucket) & O(n) Order Statistics
Beating the Omega(n log n) decision-tree bound with key-indexed Counting Sort, LSD Radix Sort stability requirement, Bucket Sort expected O(n), and deterministic O(n) Median-of-Medians.
Searching & String Pattern Matching (Animated): Binary, Interpolation, Rabin-Karp & KMP
Overflow-safe Binary Search loop invariants, Rotated Array & Ternary Search, O(log log n) Interpolation Search, Rabin-Karp rolling modular hash & spurious hits, and animated KMP LPS matching.
Graph Algorithms & Logics (Animated): BFS/DFS Edges, Topological Sort, SCCs & Dijkstra/Bellman-Ford
Animated BFS FIFO queue vs DFS LIFO stack, DFS parenthesis theorem & Back-Edge cycle detection, Kahn vs DFS topological sort, Kosaraju SCCs, and Dijkstra vs Bellman-Ford negative weight traps.
Famous Algorithms & Proofs: Max-Flow Min-Cut, Huffman Trees, Kadane, Edit Distance & Cycle Detection
Ford-Fulkerson residual networks & Edmonds-Karp O(VE^2) bound, Max-Flow Min-Cut theorem, Huffman optimal prefix code tree properties, Kadane O(n) subarray, Levenshtein DP, and Floyd cycle pointer math.
Solved Algorithms PYQs & Practice Questions
Launch Timed Mock (18 Qs)Consider the recurrence relation for and . Which of the following is the tightest asymptotic bound for ?
The complete undirected graph ( labeled vertices) has how many distinct Spanning Trees (by Cayley’s Formula)?
Five characters have frequencies . Using Huffman optimal prefix coding, what is the total weighted number of bits required to encode all characters?
What is the worst-case time complexity of Dijkstra’s single-source shortest path algorithm on a graph implemented using a Binary Min-Heap adjacency list?
What is the length of the Longest Common Subsequence (LCS) between strings X = "AGGTAB" and Y = "GXTXAYB"?
What is the minimum number of scalar multiplications required to multiply four matrices ?
What is the length of the Longest Common Subsequence (LCS) of strings and ?
Assume . Which of the following complexity-theoretic statements are TRUE?