Skip to content

Latest commit

 

History

History
77 lines (32 loc) · 846 Bytes

File metadata and controls

77 lines (32 loc) · 846 Bytes

中文文档

Description

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:

    <li>1 &lt;= len(A), len(B) &lt;= 1000</li>
    
    <li>0 &lt;= A[i], B[i] &lt; 100</li>
    

 

Solutions

Python3

Java

...