add: 左旋转字符串

This commit is contained in:
2020-05-08 13:12:12 +08:00
parent 3b8d9b3f40
commit c027a13f6e
4 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,6 @@
import { reverseLeftWords } from '../../src/string/zuo-xuan-zhuan-zi-fu-chuan-lcof'
test('左旋转字符串', () => {
expect(reverseLeftWords('abcdefg', 2)).toBe('cdefgab')
expect(reverseLeftWords('lrloseumgh', 6)).toBe('umghlrlose')
})