Which of the following is an example of a problem that can be solved using dynamic programming?
-
Finding the maximum sum of a contiguous subarray
-
Finding the maximum element in an array
-
Sorting an array of integers
-
Searching for an element in an unsorted array