In "1D (one-dimensional) DP (Dynamic Programming)", your state depends on one variable. This is the simplest form of dynamic programming. That variable is usually:
- Position:
- Value:
You already know 1D DP from Section : Fibonacci uses , Climbing Stairs uses , House Robber uses . All of these have a single index. Later sections will introduce 2D (two-dimensional) DP (two variables like ) and beyond.
For now, you focus on problems where one index is enough.