add: 最长重复子数组

This commit is contained in:
2020-07-01 18:10:39 +08:00
parent 3115552b87
commit 16ec46e003
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,5 @@
import { findLength } from '../../src/array/maximum-length-of-repeated-subarray.js'
test('最长重复子数组', () => {
expect(findLength([1, 2, 3, 2, 1], [3, 2, 1, 4, 7])).toBe(3)
})