add: 只出现一次的数字等

This commit is contained in:
2019-03-10 16:43:04 +08:00
committed by yi-ge
parent 930ff1be11
commit 8239e7afd5
106 changed files with 7978 additions and 0 deletions

View File

@ -0,0 +1,9 @@
import { commonChars } from '../../src/array/find-common-characters'
describe('查找常用字符', () => {
test('查找常用字符', () => {
expect(commonChars(['bella', 'label', 'roller']).sort()).toEqual(['e', 'l', 'l'].sort())
expect(commonChars(['cool', 'lock', 'cook']).sort()).toEqual(['c', 'o'].sort())
expect(commonChars(['acabcddd', 'bcbdbcbd', 'baddbadb', 'cbdddcac', 'aacbcccd', 'ccccddda', 'cababaab', 'addcaccd']).sort()).toEqual([].sort())
})
})