DSA tutorials
277 articles · page 7 of 14Hand-written tutorials, ordered as a recommended learning path.
- 121 Binary Tree Views Solve all binary tree view problems — left view, right view, top view, bottom view, and vertical order traversal. BFS-based Python implementations.
- 122 Tree Construction Build binary trees from inorder + preorder, inorder + postorder, and preorder + postorder. Hashmap optimization, edge cases, and Python recursive solutions.
- 123 Tree Serialization Serialize binary trees to strings and deserialize them back. BFS and DFS approaches with null handling, Python implementations, and real-world uses.
- 124 N-ary Trees & Tries Master N-ary tree traversals and Trie data structure — autocomplete, spell check, word dictionary, wildcard search. Complete Python implementations.
- 125 Balanced BST from Sorted Convert sorted arrays and linked lists into balanced BSTs using divide and conquer. BST to sorted DLL, Day-Stout-Warren algorithm, and Python implementations.
- 126 Zigzag Traversal Master zigzag level-order traversal of binary trees using deque and flag toggling. Multiple Python approaches with step-by-step walkthrough.
- 127 Vertical Order Master vertical order traversal with column-based grouping. Includes top view, bottom view, and vertical sum with Python solutions.
- 128 Advanced DP Patterns Master advanced dynamic programming patterns — interval DP, tree DP with rerooting, bitmask DP, digit DP, and optimization techniques like Knuth's and divide-and-conquer optimization.
- 129 Path Sum Variants Solve all Path Sum variants — root-to-leaf existence, find all paths, any-to-any with prefix sums. Complete Python solutions with Big-O analysis.
- 130 Symmetry & Subtree Check if a tree is symmetric, whether one tree is a subtree of another, same tree comparison, and flip equivalence. Python solutions with analysis.
- 131 Advanced Graph Algorithms Deep dive into advanced graph algorithms — Tarjan's and Kosaraju's for SCCs, bridges and articulation points, Euler paths, network flow, and 2-SAT with real-world applications.
- 132 Boundary Traversal Complete guide to boundary traversal — left boundary, leaf nodes, and right boundary in reverse. Multiple Python approaches with edge case handling.
- 133 Backtracking Deep Dive Master backtracking with the choose-explore-unchoose template. Solve N-Queens, Sudoku, word search, generate parentheses, palindrome partitioning, and subset sum.
- 134 CP Patterns The 15 most common competitive programming patterns — prefix sums, difference arrays, coordinate compression, meet in the middle, sqrt decomposition, sparse tables, binary lifting, and Mo's algorithm.
- 135 Tree to LL Learn how to flatten a binary tree to a linked list using preorder threading, Morris traversal, and how to convert a BST to a sorted doubly linked list — with full Python implementations and Big-O analysis.
- 136 Greedy Patterns Master greedy algorithm patterns including activity selection, fractional knapsack, Huffman coding, job scheduling, and gas station. With proofs and Python code.
- 137 DSA in Real Systems How real-world systems use data structures and algorithms — B-trees in databases, skip lists in Redis, inverted indexes in search, Dijkstra in routing, DAGs in Git, consistent hashing, and Bloom filters.
- 138 Tree Pruning Master tree pruning and deletion — delete nodes in BST, prune binary trees, trim BST to range, and remove leaves with a given value. Full Python implementations with Big-O analysis.
- 139 Greedy vs DP Learn when greedy algorithms work and when you need dynamic programming. Covers greedy choice property, optimal substructure, exchange arguments, and side-by-side comparisons.
- 140 Advanced String Algos Master advanced string algorithms — Z-algorithm, Rabin-Karp rolling hash, suffix arrays, Aho-Corasick multi-pattern matching, Manacher's palindrome algorithm, and string hashing techniques.