Calculating max distance between array elements in Python

Medium

Suppose you are given an array. Choose i numbers in the array, such that the absolute difference between the sum of your numbers and the sum of remaining numbers is as large as possible. Your function should return the maximum possible distance between the two sets of numbers....

Sign in to InterviewQs to view this question

Or

New to InterviewQs? Sign up now.

By proceeding, you agree to our Terms and Conditions and Privacy Policy.

Loading editor...