add: 最长回文字符串
This commit is contained in:
6
test/string/longest-palindromic-substring.test.js
Normal file
6
test/string/longest-palindromic-substring.test.js
Normal file
@ -0,0 +1,6 @@
|
||||
import { longestPalindrome } from '../../src/string/longest-palindromic-substring'
|
||||
|
||||
test('最长回文字符串', () => {
|
||||
expect(longestPalindrome('babad')).toBe('aba') // bab也是有效答案
|
||||
expect(longestPalindrome('cbbd')).toBe('bb')
|
||||
})
|
Reference in New Issue
Block a user