Skip to content
Codeloom

← Back to DSA overview

DSA tutorials

277 articles · page 3 of 14

Hand-written tutorials, ordered as a recommended learning path.

  1. 41 Stacks/Queues — Practice Eight classic stack and queue interview problems with worked Python solutions — Valid Parentheses, Min Stack, Daily Temperatures, Sliding Window Maximum, and more.
  2. 42 Stack Parsing Master stack-based parsing patterns — balanced parentheses, minimum removals, longest valid parentheses, decode string, and basic calculator with Python solutions.
  3. 43 Binary Trees — Intro A practical introduction to binary trees — the TreeNode class, terminology (full, complete, perfect, balanced), height vs depth, BSTs, and the small calculations you need to reason about tree problems.
  4. 44 Tree Traversals A practical guide to the four canonical binary tree traversals — recursive and iterative versions, when to use each, and the patterns that make them click.
  5. 45 Trees — Practice Eight classic binary tree interview problems with examples, approach notes, and clean Python solutions — max depth, same tree, invert, symmetric, path sum, LCA, validate BST, and serialize/deserialize.
  6. 46 Graphs — Intro A practical introduction to graphs — directed vs undirected, weighted vs unweighted, cyclic vs acyclic, and the three main representations (adjacency list, adjacency matrix, edge list) with Python code.
  7. 47 BFS & DFS A practical guide to BFS and DFS on graphs — recursive and iterative DFS, BFS with a deque, shortest paths on unweighted graphs, connected components, cycle detection, and five classic practice problems.
  8. 48 LRU Cache Design Design and implement an LRU Cache from scratch using a HashMap and Doubly Linked List for O(1) get and put, with Python code, OrderedDict shortcut, and real-world context.
  9. 49 Recursion Basics A practical introduction to recursion — the base case, the recursive case, the call stack, and how to think about problems that solve themselves through smaller versions of themselves.
  10. 50 DP — Intro An introduction to dynamic programming — overlapping subproblems, optimal substructure, top-down memoization, and bottom-up tabulation, with worked examples in Python.
  11. 51 DP — Practice Eight classic dynamic programming problems — Climbing Stairs, House Robber, Coin Change, LIS, Word Break, 0/1 Knapsack, Edit Distance, and LCS — each with Python solutions and DP tables.
  12. 52 Bit Manipulation A practical introduction to bit manipulation in Python — binary representation, the bitwise operators, two's complement, and the common operations to set, clear, toggle, and check individual bits.
  13. 53 Bit Tricks Six classic bit manipulation problems — Single Number, Number of 1 Bits, Power of Two, Counting Bits, Missing Number, Reverse Bits — plus the tricks that make them tick: n & (n-1), n & -n, and XOR cancellation.
  14. 54 Sort a Stack Learn how to sort a stack using only one additional stack. Step-by-step trace, Python implementation, and O(n²) complexity analysis.
  15. 55 Interval Problems Master interval problems — merge intervals, insert interval, meeting rooms, interval scheduling, sweep line technique, and non-overlapping intervals with Python implementations.
  16. 56 Two Pointers A practical guide to the two pointers technique — opposite-end and same-direction patterns, when to use each, and six classic interview problems with worked solutions.
  17. 57 Stock Span Solve the stock span problem efficiently using a monotonic stack. Includes brute force vs optimal approach, Python code, and visual trace.
  18. 58 Sliding Window A practical guide to sliding window — fixed-size vs variable-size windows, expand/shrink invariants, and six classic problems with worked Python solutions.
  19. 59 Celebrity Problem Solve the celebrity problem in O(n) time using a stack elimination technique. Includes proof of correctness, Python code, and matrix examples.
  20. 60 Sorting Overview A tour of the five sorting algorithms every programmer should know — their ideas, Big-O time and space, stability, and Python implementations, plus when to just use sort().