当前位置:网站首页>Sword finger offer 05 Replace spaces
Sword finger offer 05 Replace spaces
2022-06-25 15:36:00 【anieoo】
Original link : The finger of the sword Offer 05. Replace blank space
solution:
One traversal is enough
class Solution {
public:
string replaceSpace(string s) {
string res;
for(auto &x : s) {
if(x == ' ') res += "%20";
else res += x;
}
return res;
}
};
边栏推荐
- Go build reports an error missing go sum entry for module providing package ... to add:
- Yolov4 coco pre train Darknet weight file
- Day01: learning notes
- [C language] implementation of magic square array (the most complete)
- Data feature analysis skills - correlation test
- Websocket (WS) cluster solution
- Some usage records about using pyqt5
- Thread - learning notes
- Efficient pytorch: how to eliminate training bottlenecks
- Weka download and installation
猜你喜欢
[paper notes] semi supervised object detection (ssod)
到底要不要去外包公司?这篇带你全面了解外包那些坑!
Introduction to flexible array
04. binary tree
Kali SSH Remote Login
5 connection modes of QT signal slot
QT excel table read / write library - qtxlsx
Simulating Sir disease transmission model with netlogo
MySQL performance optimization - index optimization
Arthas, a sharp tool for online diagnosis - several important commands
随机推荐
Stderr and stdout related standard outputs and other C system APIs
golang reverse a slice
Agent and classloader
剑指 Offer 05. 替换空格
Thread - learning notes
Getting started with lambda8 new features
Using reentrantlock and synchronized to implement blocking queue
在打新债开户证券安全吗,需要什么准备
Is it safe to open a stock account through the account opening link of the account manager?
QT source code online view
QT pattern prompt box implementation
剑指 Offer 09. 用两个栈实现队列
Kali modify IP address
解决Visio和office365安装兼容问题
Highly concurrent optimized Lua + openresty+redis +mysql (multi-level cache implementation) + current limit +canal synchronization solution
Boost listening port server
How to deal with mining process
[paper notes] poly yolo: higher speed, more precise detection and instance segmentation for yolov3
Is it safe to open a stock account in Guoxin golden sun?
程序员 VS 黑客的思维 | 每日趣闻