Algo Notes
  • Graphs
    • Shortest Paths
    • Union-Find
    • Minimum Spanning Trees
  • Two Pointers
  • Sliding Window
  • Stack & Queues
    • Monotonic Stack
  • Priority Queues
  • Dynamic Programming
  • Binary Indexed Tree (Fenwick Tree)
Powered by GitBook
On this page

Dynamic Programming

  • Used with problems that have:

    • Optimal substructure

    • Overlapping subproblems

  • Bottom-up: iterative (tabulation), top-down: recursive (memoization)

  • We need base cases, a recurrence relation for state transisition, and a function or data structure to compute/contain answers for any given state.

PreviousPriority QueuesNextBinary Indexed Tree (Fenwick Tree)

Last updated 3 years ago