Search
⌘K

Leetcode 918. Maximum Sum Circular Subarray

Given a circular integer array, return the maximum sum of any non-empty contiguous subarray (allowed to wrap from end to start). Typical solution uses Kadane’s algorithm for the non-wrapping case and total-sum minus minimum-subarray for the wrapping case, with care for the all-negative edge case.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.