{"id":"min-cost-final-answer-is-min-of-last-two","text":"The final `min(prev1, prev2)` is necessary because you can reach the top (one past the last index) from either of the last two steps.","truth_value":"IN","source":"entries/2026/06/06/min-cost-climbing-stairs-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":["dp-to-streaming-via-rolling-variable-reduction"],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"min-cost-final-answer-is-min-of-last-two","truth_value":"IN","reason":"premise"}]}}