title | tags | categories | author | comments | updated | permalink | mathjax | top | description | date | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|
[0718] 最长重复子数组 |
|
|
张学志 |
true |
false |
false |
false |
... |
2019-12-31 16:11:58 -0800 |
给两个整数数组 A
和 B
,返回两个数组中公共的、长度最长的子数组的长度。
示例 1:
输入: A: [1,2,3,2,1] B: [3,2,1,4,7] 输出: 3 解释: 长度最长的公共子数组是 [3, 2, 1]。
说明:
- 1 <= len(A), len(B) <= 1000
- 0 <= A[i], B[i] < 100
Related Topics
class Solution {
public:
int findLength(vector<int>& A, vector<int>& B) {
}
};