DSA tutorials
277 articles · page 8 of 14Hand-written tutorials, ordered as a recommended learning path.
- 141 Tree Distance Solve distance problems in binary trees — distance between two nodes, all nodes at distance K, burning a tree from a node, and sum of distances using rerooting. Full Python implementations.
- 142 Topological Sort Master topological sorting with Kahn's BFS and DFS approaches. Solve course scheduling, build dependencies, alien dictionary, and longest path in DAG problems.
- 143 Advanced Tree Algos Deep dive into advanced tree algorithms — heavy-light decomposition, Euler tour technique, centroid decomposition, LCA with binary lifting, tree DP with rerooting, and virtual trees.
- 144 BST Iterator Master BST iterator using stack-based controlled in-order traversal, range sum queries, counting nodes in range, closest value, and closest K values — with full Python implementations.
- 145 Problem Solving Framework A complete framework for solving coding interview problems — the 5-step method, pattern recognition, handling stuck moments, communication strategies, common mistakes, and a 100-problem practice roadmap.
- 146 Tree Interview Guide The complete guide to binary tree interview patterns — top 20 patterns, DFS vs BFS decision guide, recursive vs iterative approaches, common mistakes, complexity cheatsheet, and template code.
- 147 DS Comparison Guide A comprehensive comparison of data structures — arrays vs linked lists, hash maps vs trees vs tries, heaps vs BSTs, stacks vs queues, sets vs Bloom filters, with decision flowcharts and complexity tables.
- 148 Cycle Detection Learn how to detect cycles in directed and undirected graphs using DFS with parent tracking, three-color DFS, and Union-Find with Python implementations.
- 149 Shortest Path Comparison Compare all four shortest path algorithms with Python code, complexity analysis, and a decision flowchart for choosing the right one.
- 150 SCCs Master SCCs with Kosaraju's two-pass DFS and Tarjan's low-link algorithm, including condensation graphs and real applications in Python.
- 151 Articulation Points Find critical nodes and edges in graphs using Tarjan's algorithm with discovery and low-link arrays, with Python code and network applications.
- 152 A* Search Learn the A* search algorithm with f=g+h, admissible heuristics, grid pathfinding, and Python implementation compared to Dijkstra and BFS.
- 153 Multi-Source BFS Master multi-source BFS for rotting oranges, walls and gates, 01-BFS, and matrix distance problems with Python implementations.
- 154 Graphs on Matrix Solve grid-based graph problems including flood fill, number of islands, shortest path in binary matrix, and surrounded regions with Python.
- 155 Euler Path/Circuit Understand Euler paths, circuits, and Hamiltonian differences with Hierholzer's algorithm, degree conditions, and Python implementations.
- 156 Network Flow Understand max flow, residual graphs, augmenting paths, Ford-Fulkerson, Edmonds-Karp, and the max-flow min-cut theorem with Python code.
- 157 Graph Coloring Learn graph coloring with greedy coloring, bipartite check via 2-coloring, m-coloring with backtracking, and applications in scheduling.
- 158 Bipartite Check Learn how to check if a graph is bipartite using BFS 2-coloring and DFS, with applications in matching, scheduling, and conflict detection.
- 159 Connected Components Master finding connected components using DFS, BFS, and Union-Find with applications to counting islands and grid connectivity problems.
- 160 Shortest Path Grid Master shortest path algorithms on grids including BFS for unweighted grids, 0-1 BFS with deque, and Dijkstra for weighted terrain with obstacles and portals.