In this video I demonstrate dynamic programming by using it to solve a math problem: how many subsets of {1,…,2000} have a sum divisible by 5?
Along the way we'll talk about phrasing a problem as a recurrence and using optimization techniques like memoization or solving the subproblem first to get an efficient runtime for the algorithm.
Here's where I got the problem from (3Blue1Brown): https://www.youtube.com/watch?v=bOXCLR3Wric
Download
0 formats
No download links available.
Solving the subsets problem with dynamic programming | NatokHD