What is the difference between bottom-up and top-down?

The bottom-up approach (to dynamic programming) consists in first looking at the “smaller” subproblems, and then solve the larger subproblems using the solution to the smaller problems.

The top-down consists in solving the problem in a “natural manner” and check if you have calculated the solution to the subproblem before.

I’m a little confused. What is the difference between these two?

9 Answers
9

Leave a Comment