Search
⌘K

Leetcode 2607. Make K-Subarray Sums Equal

Given a circular array and integer k, find the minimum number of ±1 element operations to make every length-k subarray sum equal; this reduces to grouping indices into gcd(n,k) cycles via i -> (i+k) mod n and independently equalizing each cycle (choose the median value to minimize total L1 adjustments).


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.