CoursesDynamic ProgrammingGrid DP

Triangle

The bottom-up collapse: seed dp with the last row, fold each row upward with dp[j] = t[i][j] + min(dp[j], dp[j+1]), and the whole triangle converges to a single answer at dp[0] — no ragged-edge special cases.

Complete codeMultiple choiceTrace6 exercises, 7 min
AlgoFox Pro

Dynamic Programming is part of AlgoFox Pro

You can read the whole course outline here. The exercises are in the app, along with your streak, your mistake review, and the progress that carries across your devices.

Pro starts with a 3 day free trial. The app store decides who is eligible for an introductory offer, and a lapsed subscription does not get another one.

Download AlgoFox on the App StoreGet AlgoFox on Google Play

Already subscribed in the app? Sign in with the same account and Pro works here too. Quick Play and Battle are free on the web, and so is the first course in every subject.