Minimum difference between two arrays

Posted apanda009

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Minimum difference between two arrays相关的知识,希望对你有一定的参考价值。

是不是dp[i][j]是到a[i]和b[j]的最小diff之和
那么dp[i][j] = min( dp[i-1][j-1]+math.abs(a[i]-b[j]), dp[i][j-1])
第一个是肯定包含b[j]的,第二个是肯定不包含b[j]的,

  

 

以上是关于Minimum difference between two arrays的主要内容,如果未能解决你的问题,请参考以下文章

LeetCode Minimum Absolute Difference in BST

539. Minimum Time Difference

539. Minimum Time Difference

leetcode-539-Minimum Time Difference

leetcode--539. Minimum Time Difference

Python解Leetcode: 539. Minimum Time Difference