Ideas: the left n bits is n bits prior to the string to move
# -*- coding:utf-8 -*-
class Solution:
def LeftRotateString(self, s, n):
# write code here
return s[n:] + s[:n]
Ideas: the left n bits is n bits prior to the string to move
# -*- coding:utf-8 -*-
class Solution:
def LeftRotateString(self, s, n):
# write code here
return s[n:] + s[:n]