Codeforces Dynamic Programming 336 Div 1 B - Zuma (Rated 1900)

Codeforces Dynamic Programming 336 Div 1 B - Zuma (Rated 1900)

Codeforces Dynamic Programming Competitive Programming Algorithms: This video describes the solution to Codeforces Round 336 Div 1 B problem titled Zuma (rated 1900) The solution discussed uses Range Dynamic Programming technique. Problem Link: https://codeforces.com/contest/607/pr... Solution Link: https://codeforces.com/contest/607/su... Notes: 1) Our DP state was DP[l][r] is the min # of seconds to destroy the line from positions l to r (This state is fixed for all Range DP problems.) 2) We derived the recurrence considering the leftmost gemstone which needs to be destroyed along with a corresponding gemstone of the same colour which is to the right of this gemstone. If you have any doubts on the solution, please feel to post them in the comments below. If you liked this video, please give it a "thumbs up". Also, consider subscribing to my channel if you would like to see similar content. Here is the link to my DP problem solving playlist:    • Codeforces Dynamic Programming Series   Hope you are able to solve many of the problems in the above playlist.