Problem 5. Maximum Subarray (10 points)Given an array of n n…

Problem 5. Maximum Subarray (10 points)Given an array of n numbers, give a divide-and-conquer algorithm that finds the subarray that has themaximum sum and returns its sum. For example, Input: arr[] = [2, 3, -8, 7, -1, 2, 3] Output: 11. Explanation:The subarray [7, -1, 2, 3] has the largest sum 11.