Need an algorithm for this problem
Posted
by Heisenburgor
on Stack Overflow
See other posts from Stack Overflow
or by Heisenburgor
Published on 2010-06-01T18:09:09Z
Indexed on
2010/06/01
18:13 UTC
Read the original article
Hit count: 174
There are two integer sequences A[] and B[] of length N,both unsorted.
Requirement: through the swapping of elements between A[] and B[], make the difference between {the sum of all elements in A[]} and {the sum of all elements in B[]} to be minimum.
Many thanks
© Stack Overflow or respective owner