码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2017-11-07 23:02:04      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:length   lan   strong   and   pre   return   ted   leetcode   ret   

 

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 最长的重复子数组

标签:length   lan   strong   and   pre   return   ted   leetcode   ret   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!