Order the steps
Order the steps for designing a DP.
- Write how a cell is built from smaller cells
- Define what one cell of the table means
- Choose a fill order where each cell's inputs are ready
- Set the base cases
Choose an answer, then open Show answer below to check it.
Show answer
Answer: B A D C
- Define what one cell of the table means Everything else depends on this sentence.
- Write how a cell is built from smaller cells This is the transition, the heart of the solution.
- Set the base cases These cells need no computation.
- Choose a fill order where each cell's inputs are ready Then estimate cost and memory.