← Microsoft questions

Minimum difference of subarray

Filed under Microsoft

Divide an array of length n into two subarrays such that the difference between their sums is minimized. If n is even, both subarrays must have length n/2; if n is odd, the lengths should be (n-1)/2…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.