Dynamic programming solves optimization problems by recursively decomposing them into subproblems, s...