当前位置:网站首页>剑指offer 第 3 天字符串(简单)
剑指offer 第 3 天字符串(简单)
2022-06-25 12:19:00 【辞树 LingTree】
剑指 Offer 05. 替换空格
https://leetcode-cn.com/problems/ti-huan-kong-ge-lcof/
class Solution {
public String replaceSpace(String s) {
String str = s.replace(" ", "%20");
return str;
}
}
剑指 Offer 58 - II. 左旋转字符串
https://leetcode-cn.com/problems/zuo-xuan-zhuan-zi-fu-chuan-lcof/
class Solution {
public String reverseLeftWords(String s, int n) {
String a = s.substring(0, n);
//System.out.println(a);
String b = s.substring(n, s.length());
//System.out.println(b);
String str = b + a;
//System.out.println(s);
return str;
}
}
边栏推荐
- Matlab simulation of m-sequence
- 使用Visio画立方体
- JVM参数解释
- Initialize the project using the express framework
- Resolved: could not find artifact XXX
- 2021-10-21
- Select randomly by weight [prefix and + dichotomy + random target]
- 3+1 guarantee: how is the stability of the highly available system refined?
- torch.tensor拼接与list(tensors)
- Geospatial search: implementation principle of KD tree
猜你喜欢

MySQL adds, modifies, and deletes table fields, field data types, and lengths (with various actual case statements)
![[转]以终为始,详细分析高考志愿该怎么填](/img/77/715454c8203d722e246ed70e1fe0d8.png)
[转]以终为始,详细分析高考志愿该怎么填

C program linking SQLSERVER database: instance failed

架构师需要具备的能力
![[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1](/img/36/167397ce61240036c865dd99463f1b.jpg)
[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1

laravel 9
![[visio] solving the fuzzy problem of parallelogram in word](/img/04/8a1de2983d648e67f823b5d973c003.png)
[visio] solving the fuzzy problem of parallelogram in word

MySQL and excel tables importing database data (Excel for MySQL)

地理空间搜索 ->R树索引

深圳民太安智能二面_秋招第一份offer
随机推荐
515. Find Largest Value in Each Tree Row
Jupyter notebook theme font setting and automatic code completion
Event triggered when El select Clear clears content
20220620 面试复盘
模块五(微博评论)
Shell learning notes (latest update: 2022-02-18)
2021-09-28
Match regular with fixed format beginning and fixed end
RESTful和RPC
词法陷阱(C)
Jupyter Notebook主题字体设置及自动代码补全
How to implement a high-performance load balancing architecture?
Reload cuda/cudnn/pytorch
Render values to corresponding text
3+1保障:高可用系统稳定性是如何炼成的?
Initialize the project using the express framework
Spoken English - weak reading
[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1
Resolution of PPT paper drawing
First acquaintance with CANopen