 All Problems
Maximum Sum Circular Subarray
medium
dynamic programming
arrays
amazon
google
facebook

Given a circular integer array nums, return the maximum possible sum of a non-empty subarray. A circular subarray can wrap around from the end to the beginning.

Example 1:

Input: 1 -2 3 -2
Output: 3

Example 2:

Input: 5 -3 5
Output: 10

Input format: Space-separated integers.

Output format: Maximum circular subarray sum.

Run to check your code against the sample cases, or submit to run every case