Reduce memory usage in dynamic programming via rolling arrays, dimension reduction, bit tricks, and algebraic shortcuts.
keep prev row
subset states
range reuse
windowing
math formula
Explore common transformations that collapse memory while preserving correctness.