Algorithms

State transition equation

The formula that computes a state's solution from smaller states that are already solved.

Example

In stair climbing, dp[i] = dp[i βˆ’ 1] + dp[i βˆ’ 2]: with dp[3] = 3 and dp[4] = 5, dp[5] = 8.

Test yourself: State transition equation

Dynamic programming

The formula dp[i] = dp[i βˆ’ 1] + dp[i βˆ’ 2] is the state ___ equation.

Lessons that use it

More algorithms terms

All terms β†’

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.