首页 > 编程语言 > 详细

[LeetCode] Maximum Length of Repeated Subarray 最长的重复子数组

时间:2017-11-07 22:41:42      阅读:195      评论:0      收藏:0      [点我收藏+]

 

Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays.

Example 1:

Input:
A: [1,2,3,2,1]
B: [3,2,1,4,7]
Output: 3
Explanation: 
The repeated subarray with maximum length is [3, 2, 1].

Note:

    1. 1 <= len(A), len(B) <= 1000
    2. 0 <= A[i], B[i] < 100

 

s

 

[LeetCode] Maximum Length of Repeated Subarray 最长的重复子数组

原文:http://www.cnblogs.com/grandyang/p/7801533.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!