字符串循环左移前K位

字符串循环左移前K位
python语言实现
两种方法实现:
1.三次翻转方法
2.直接利用python中字符串的切片方法

import pdb 
def reverse(s,left,right):
#    pdb.set_trace()
    while left

你可能感兴趣的:(algorithm)