Patterns - DP Flashcards
1
Q
Minimum (Maximum) Path to Reach a Target
A
Problems: https://leetcode.com/list/55ac4kuc/
Statement
Given a target find minimum (maximum) cost / path / sum to reach the target.
Approach Choose minimum (maximum) path among all possible paths before the current state, then add value for the current state. routes[i] = min(routes[i-1], routes[i-2], ... , routes[i-k]) + cost[i]