Dynamic programming comes into play to save redundant computations and improve performance

Dynamic Programming

With dynamic programming, we break problems down into smaller sub problems. The solution to the sub problems get stored in memory, which is called memoization. Memoization is also called the top-down approach.

The top down approach takes the original problem and solves the smallest sub problem first. The pattern is repeated over and over using a recursive function, it stops once the base case hits. The results of the sub problem are stored in memory (what is called memoization),

Bottom up, or tabulation method, is when you work from the smallest first, and store the resul(s) in memory. This method if often considered more efficient

Naive Recursive Approach

A recursive method that will evaluate all potential cuts and calculating the total profit for each. This method is inefficient, and it recalculates the same subproblem, which leads to repeated execution of the same code over and over. This leads to overhead cost and is considered inefficient.

Check back later for more content on dynamic programming, I will have some code