橙子爱吃桃子
橙子爱吃桃子
全部文章
题解
C++字符串笔记(1)
归档
标签
去牛客网
登录
/
注册
橙子爱吃桃子的博客
全部文章
/ 题解
(共70篇)
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
795
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
620
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
589
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
509
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
872
C++/一行代码解决:
C++/一行代码解决: class Solution { public: string LeftRotateString(string str, int n) { return (n > str.size()) ? str : (str + str).substr(n,...
2020-05-27
3
788
C++简单代码/set去重/剪枝/追溯法/10行:
C++简单代码/set去重/剪枝/追溯法/10行: class Solution { public: set<string> res; //去重 vector<string> Permutation(string str) { if (str....
2020-05-27
11
1082
C++简单代码/4行:
C++简单代码/4行: class Solution { public: vector<int> multiply(const vector<int>& A) { vector<int> res(A.size()); ...
2020-05-26
1
554
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
668
C++/代码:
C++/代码: class Solution { public: vector<vector<int> > Print(TreeNode* pRoot) { vector<vector<int>> res; //定义二维数组 ...
2020-05-10
1
746
首页
上一页
1
2
3
4
5
6
7
下一页
末页