Back to problems

Find Largest Sum Contiguous Subarray

Algorithm · Cisco · Easy

You are given an array of integers—both positive and negative values allowed. Identify the contiguous subarray (a continuous run of elements) whose total sum is the largest possible, and return that maximum sum. Function Signature Constraints n (the array length) is a positive integer. Each element fits within standard integer bounds (both negative and positive). Example Explanation: The subarray [3, -2, 4] produces the sum 5, which is the highest achievable contiguous sum…

Checking your access…