Minimize Sum of Absolute Difference of Two Arrays

前端 未结 0 835
夕颜
夕颜 2021-01-27 20:02

I have two arrays of integers A and B both of size n. The cost of a pair is |a - b|. I want to pair the n elements of A and B such that the sum of all costs across all a\'s and

相关标签:
回答
  • 消灭零回复
提交回复
热议问题