add: 最长回文字符串
This commit is contained in:
1 parent
2120bcdecf
commit
a2ccc4764b
4 files changed
+48
No files matched your search
@@ -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