Algorithms
and
Data
Structures

Spring 2022
course
site
-->

May 19

Questions about anything?

I've caught up with the grading, so check out my comments on your projects. If you're missing assignments, I encourage you to try to fill in the missing pieces - late work does count for some credit.

Common problems I'm seeing in your final project drafts:

change making

Today we'll look at one last classic problem, making change, using (a) brute force, (b) greedy goal seeking, and (c) dynamic programming.

The (badly named) "dynamic programming" approach is a generalization of "memoization" which is basically the trick of (a) breaking the problem into smaller sub-problems, and (b) storing the answers to those subproblems so that you don't recalculate them. One example: Finding Fibonnici number fib(n) = fib(n-1) + fib(n-2) using that (recursive) formula, but storing values in a dictionary rather than recalculating them.

Explanations :

lightening review

What have we covered this term?

aside

https://cs.bennington.college /courses /spring2022 /algorithms /notes /may19
last modified Thu May 19 2022 2:41 pm