Given a circular integer array nums, return the maximum possible sum of a non-empty subarray. A circular array means the end connects to the beginning.
30:00
Java
Maximum Sum Circular Subarray
medium
Topics
Companies
Given a circular integer array nums, return the maximum possible sum of a non-empty subarray. A circular array means the end connects to the beginning.
Example 1:
Input: [5,-3,5]
Output: 10
Constraints:
n==nums.length
1≤n≤3×104
−3×104≤nums[i]≤3×104
Input
arr =[5,-3,5]
Find max circular subarray sum in array of 3 elements