当前位置:网站首页>Sword finger offer (43): left rotation string
Sword finger offer (43): left rotation string
2022-07-26 10:46:00 【Konstanch】
solution 1: Simple method , Direct character splicing
class Solution:
def LeftRotateString(self, s, n):
# write code here
new1 = s[:n]
new2 = s[n:]
new = new2 + new1
return new
边栏推荐
猜你喜欢

RT thread learning notes (VI) -- start the elmfat file system based on SPI flash (Part 1)

349. 两个数组的交集

Flutter编译报错 version of NDK matched the requested version 21.0.6113669. Versions available locally: 2

RT-Thread 学习笔记(三)---用SCons 构建编译环境

英语基础句型结构------起源

0x00007FFD977C04A8 (Qt5Sqld.dll)处(位于 a.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000000000000010 时发生访问冲突

从蚂蚁的觅食过程看团队研发(转载)

在神州IV开发板上成功移植STemWin V5.22

35. 搜索插入位置

2021-08-12 function recursion_ Learn C language with brother Peng
随机推荐
[leetcode daily question 2021/4/29]403. Frogs cross the river
使用float实现左中右布局,中间内容自适应
点击el-dropdown-item/@click.native
winpcap 抓包函数pcap_loop(),停止问题
c结构体中定义的成员指针赋值与结构体指针作为成员函数参数的使用
WinPcap packet capturing function pcap_ Loop (), stop the problem
344.反转字符串
剑指Offer(二十):包含min函数的栈
toolstrip 去边框
Codepoint 58880 not found in font, aborting. flutter build apk时报错
[leetcode daily question 2021/5/8]1723. The shortest time to complete all work
Flutter 防止科学计数并去除尾数无效0
使用flex实现左中右布局,中间自适应
RT thread learning notes (V) -- edit, download and debug programs
2021-08-13 learn C language with pengge - array
PLC与伺服电机连接
剑指Offer(二十):包含min函数的栈
英语基础句型结构------起源
Zongzi battle - guess who can win
使用定位实现左中右布局,中间内容自适应