Tap here to switch tabs
Problem
Submissions

Problem: Maximum Length of Repeated Subarray

Maximum Length of Repeated Subarray compares two integer arrays and asks you to return the greatest length of a contiguous sequence that appears in both arrays in the same order.

Statement

Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays.

Constraints:

  • 1≤1 \leq nums1.length, nums2.length ≤1000\leq 1000

  • 0≤0 \leq nums1[i], nums2[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Length of Repeated Subarray

Maximum Length of Repeated Subarray compares two integer arrays and asks you to return the greatest length of a contiguous sequence that appears in both arrays in the same order.

Statement

Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays.

Constraints:

  • 1≤1 \leq nums1.length, nums2.length ≤1000\leq 1000

  • 0≤0 \leq nums1[i], nums2[i] ≤100\leq 100