Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the base case for paths at (0, 0)?
Consider how many ways you can stay at the origin.
If there is a hole at (1, 1), what will paths(1, 1) equal?
Think about how many paths can reach a hole.
What condition states that paths equal zero?
Remember the definition of a hole in the grid.
Dynamic programming builds solutions in what manner?
Analyze the structure of dynamic programming.
Given a 5x5 grid with holes at (2, 2) and (3, 3), outline a path-finding algorithm that utilizes dynamic programming to calculate how to reach (4, 4).
Create your table based on a structure where you check left and below for computations.
Create a memoized function to compute paths in a 3x3 grid, explaining how you avoid repeated calls.
Think about the strategy for storing results to prevent re-evaluation.
5 more questions in this section. Enroll free to practise them all.
Enroll free