当前位置:网站首页>字符串 反转
字符串 反转
2022-06-10 20:50:00 【Morris_】
LC 反转字符串
- swift 实现
var s: [Character] = ["h","e","l","l","o"]
reversString(&s)
print(s)
func reversString(_ s: inout [Character]) {
var temp: [Character] = []
var index = s.count - 1
while index >= 0 {
temp.append(s[index])
index -= 1
}
s = temp
}
边栏推荐
- I'm doing something cool
- Has the samesite cookie problem occurred when using identityserver?
- Leetcode advanced path - delete duplicates in the sorting array
- 2022-06-09 rk817 PMU battery temperature detection
- Qingniao Changping campus of Peking University: can I learn UI with a high school degree?
- SoC development environment and hardware development preparation
- Course design of imitation pottery ticket of wechat applet
- [nk] 牛客月賽51 G計算題
- MySQL范围查询优化的场景实例详解
- Share this great God's WPF interface design series video
猜你喜欢

构建幼儿Steam教育实施策略

SoC development environment and hardware development preparation

【北大青鸟昌平校区】职教与普教协调发展,今年的中考会容易吗?

Abbexa acrylamide peg NHS instructions

2022-06-09 rk817 PMU battery temperature detection

Acl2022 | bert2bert: an efficient pre training method of parameter reuse, which significantly reduces the training cost of oversized models

Forward slash "/", backslash "\," escape character "\" and file path separator cannot be clearly remembered

解读创客空间下的教育新生态

Interview Essentials - basic knowledge of synchronized underlying principles

Abbexa 8-OHdG CLIA kit solution
随机推荐
初中毕业生,选择中职学校也可以升入高等学府
How to choose the field of we media video creation?
在模仿学习中进步的智能机器人
2022-06-09 RK817 PMU 电池温度检测
ThinkPHP v6.0. X deserialization vulnerability recurrence
Redis cache avalanche
As a programmer, is it really that important for the underlying principles?
System reinstallation and system performance query
标配双安全气囊,价格屠夫长安Lumin 4.89万起售
Cordova Plugin /JPush PhoneGap 极光推送_本地推送_消息推送
C language learning review -- 1 basic knowledge review
【MySQL】常见数据类型总结
北大青鸟昌平校区:高中学历可以学UI吗?
Mysql中创建4种索引的不同方式
The system needs to scan all the files and try to identify the cover of the video
Exec function of PHP
SQL第四练:字符串处理函数
The process of keyword search in Oracle tables
[nk] Niuke monthly competition 51 f-average question
Interview Essentials - basic knowledge of synchronized underlying principles