Return the minimum of the two odd-minus-even index sum differences.
Unlock detailed company stats for this questionUpgrade
Given an array, add all elements at odd indices and all at even indices, then compute sum_odd - sum_even. Then swap the roles and compute sum_even - sum_odd. Return the minimum of these two results.
Community answers
No answers contributed by the community yet.
Related questions
Minimum Difference in Sums After Removal of Elements.Given an array of integers, return the pairs with the minimum absolute difference between them.Related courses

Course

Course
Course
