I\'ve been trying to think of a way to optimize a problem for an animation project that I\'m doing. I know the problem can be optimized with dynamic programming because it\'