当前位置:网站首页>Sword finger offer day 3 string (simple)
Sword finger offer day 3 string (simple)
2022-06-25 12:59:00 【Lingtree】
class Solution {
public String replaceSpace(String s) {
String str = s.replace(" ", "%20");
return str;
}
}
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;
}
}
边栏推荐
- [Visio]平行四边形在Word中模糊问题解决
- Oral English - continuous reading
- The push(), pop(), unshift(), shift() method in the JS array
- Alibaba stability fault emergency handling process
- 剑指 Offer II 028. 展平多级双向链表
- Another night when visdom crashed
- Idea2017 how to set not to automatically open a project at startup
- JVM参数解释
- Koa frame
- 重装cuda/cudnn/pytorch
猜你喜欢
随机推荐
Resolved: could not find artifact XXX
与生产环境中的 console.log 说再见
Elemtnui select control combined with tree control to realize user-defined search method
聊聊高可用的 11 个关键技巧
JSTL tag: fmt:formatdate tag format Chinese standard time or timestamp
架构师必备的七种能力
MySQL 学习笔记
JVM参数解释
PPT绘图之AI助力论文图
[转]以终为始,详细分析高考志愿该怎么填
MySQL writes user-defined functions and stored procedure syntax (a detailed case is attached, and the problem has been solved: errors are reported when running user-defined functions, and errors are r
Using CMD (command prompt) to install MySQL & configure the environment
list.replace, str.append
Render values to corresponding text
[machine learning] model and cost function
Jupyter notebook theme font setting and automatic code completion
Idea2017 how to set not to automatically open a project at startup
Methods of strings in JS charat(), charcodeat(), fromcharcode(), concat(), indexof(), split(), slice(), substring()
Native JS --- infinite scrolling
1251- Client does not support authentication protocol MySql错误解决方案
https://leetcode-cn.com/problems/ti-huan-kong-ge-lcof/![[flask tutorial] flask overview](/img/e8/d85ac54f3a9eb3b1ab31852761154c.jpg)







