medium Arrays 100 points

Find Maximum Sum of Subarray

Write a function that finds the maximum sum of a subarray of a given array of integers. The function should return the maximum sum of a subarray. For example, given the array [-2, -3, 4, -1, -2, 1, 5, -3], the function should return 7, which is the maximum sum of the subarray [4, -1, -2, 1, 5].

Problem Description

Write a function that finds the maximum sum of a subarray of a given array of integers. The function should return the maximum sum of a subarray. For example, given the array [-2, -3, 4, -1, -2, 1, 5, -3], the function should return 7, which is the maximum sum of the subarray [4, -1, -2, 1, 5].

Examples

Example

Input: [-2, -3, 4, -1, -2, 1, 5, -3]

Output: 7

Challenge Info

100 Points

Reward

medium

Difficulty

No limit

Time Limit

Submission Stats

Total Submissions 0
Accepted 0
Success Rate 0%