当前位置:网站首页>剑指Offer(四十三):左旋转字符串
剑指Offer(四十三):左旋转字符串
2022-07-26 10:36:00 【康斯坦奇】
解法1:简单方法,直接字符拼接
class Solution:
def LeftRotateString(self, s, n):
# write code here
new1 = s[:n]
new2 = s[n:]
new = new2 + new1
return new
边栏推荐
猜你喜欢
The software cannot be opened

Issue 5: the second essential skill for College Students
![[Halcon vision] image filtering](/img/7a/b95f8977f02fab644ef9fb205424e7.png)
[Halcon vision] image filtering

异常的概念与处理

Redis docker instance and data structure

STM32 阿里云MQTT esp8266 AT命令
![[Halcon vision] affine transformation](/img/f1/32284c71e78e6eea390fdb6058ba0f.png)
[Halcon vision] affine transformation
![Structure of [Halcon vision] operator](/img/d9/e16ea52cea7897e3a1d61d83de472f.png)
Structure of [Halcon vision] operator

文案秘籍七步曲至----文献团队协作管理
![[leetcode每日一题2021/5/8]1723. 完成所有工作的最短时间](/img/e7/a48bb5b8a86cbc4cd5b37bb16661a8.png)
[leetcode每日一题2021/5/8]1723. 完成所有工作的最短时间
随机推荐
点击el-dropdown-item/@click.native
[leetcode每日一题2021/4/29]403. 青蛙过河
12 复制对象时勿忘其每一个成分
Inheritance method of simplified constructor (II) - class inheritance in ES6
构造器、方法重载、对象数组和static
C language calculation date interval days
Issue 6: which mainstream programming language should college students choose
粽子大战 —— 猜猜谁能赢
Datav beautiful data screen production experience
Agenda express | list of sub forum agenda on July 27
将json文件中数组转换为struct
[Halcon vision] array
Uniapp uses the simple method signalr (only for web debugging, cannot package apps)
L2-005 set similarity (intersection of vector and set)
同步方法中不使用asyncTask<T> 修饰和await获取异步返回值(同步方法中调用异步方法)
[leetcode每日一题2021/8/31]1109. 航班预订统计【中等】差分数组
Parallelism, concurrency and several directions for high concurrency optimization
7-25 0-1背包 (50分)
Analysis of the transaction problem of chained method call
Simple use of json-c Library -- converting JSON files to struct