橙子爱吃桃子
橙子爱吃桃子
全部文章
分类
C++字符串笔记(1)
题解(70)
归档
标签
去牛客网
登录
/
注册
橙子爱吃桃子的博客
TA的专栏
1篇文章
0人订阅
C++相关总结
1篇文章
808人学习
全部文章
(共71篇)
C++简单代码/10行:
C++简单代码/10行: class Solution { public: string ReverseSentence(string s) { for(int i = 0; i < s.size() && s[i] == ' ';i ++) ...
2020-05-28
1
909
C++简单代码/4行/斐波那契数列:
C++简单代码/4行/斐波那契数列: class Solution { public: int rectCover(int number) { int res = 1, res_first = 1; for (int i = 2; i <= number...
2020-05-27
1
710
C++/简单代码/三行:
C++/简单代码/三行: class Solution { public: int jumpFloorII(int number) { int res = 1; for (int i = 2; i <= number; i ++) res *= 2; ...
2020-05-27
2
741
C++/简单代码/4行:
C++/简单代码/4行: class Solution { public: int jumpFloor(int number) { int res_first = 0, res = 1; for (int i = 1; i <= number ; i +...
2020-05-27
1
624
C++简单代码/10行:
C++简单代码/10行: class Solution { public: int StrToInt(string str) { int flag = 1, i = 0; long res = 0; if (str[i] == '-') fla...
2020-05-27
1
997
C++/一行代码解决:
C++/一行代码解决: class Solution { public: string LeftRotateString(string str, int n) { return (n > str.size()) ? str : (str + str).substr(n,...
2020-05-27
3
912
C++简单代码/set去重/剪枝/追溯法/10行:
C++简单代码/set去重/剪枝/追溯法/10行: class Solution { public: set<string> res; //去重 vector<string> Permutation(string str) { if (str....
2020-05-27
11
1249
C++简单代码/4行:
C++简单代码/4行: class Solution { public: vector<int> multiply(const vector<int>& A) { vector<int> res(A.size()); ...
2020-05-26
1
639
C++/代码/hashmap
C++/代码/Hashmap class Solution { public: //Insert one char from stringstream unordered_map<char,int> mmap; string s; void Insert(ch...
2020-05-20
1
763
字符串:
来自专栏
1.s.find(res)函数,在s当中查找res,查找到返回第一字符的下表,未找到返回-1;s.rfind(res),反向查找。s1.find(s2, 2) ; //从S1的下标为2字符开始查找子串S22.s.repalce(i,1,res)在s当中将i开始的1个字符替代为res3.s.ins...
2020-05-19
1
808
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页