SROMEI
SROMEI
全部文章
题解
C++(3)
归档
标签
去牛客网
登录
/
注册
SROMEI的脱发日记
我变秃了,也变强了
全部文章
/ 题解
(共8篇)
[剑指offer 编程题]二叉搜索树的后序遍历序列
class Solution { public: bool VerifySquenceOfBST(vector<int> sequence) { //二叉搜索树的后序遍历的特征,左右根 //往前找,第一个比它小的是它的左子树,第一个比它大的是它的右...
剑指offer
树
C++
C++标准库
vector
2019-10-20
0
547
[剑指offer 编程题]栈的压入、弹出序列
class Solution { public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { int i=0,j=1; int length = pushV.size();...
剑指offer
C++
C++标准库
栈
vector
2019-10-20
0
684
[剑指offer 编程题] 字符串的排列
class Solution { public: vector<string> Permutation(string str) { if(str.length() == 0)return this->result; int cho...
剑指offer
C++
string
C++标准库
C++11
STL
回溯
2019-10-20
0
629
[剑指offer 编程题]机器人的运动范围
class Solution { public: int movingCount(int threshold, int rows, int cols) { //生成一个矩阵,里面所有的值置为0为没走过,-1为走不了,1为走了的; vector<...
剑指offer
递归
C++
回溯
2019-09-21
0
870
[剑指offer 编程题]滑动窗口的最大值
class Solution { public: vector<int> maxInWindows(const vector<int>& num, unsigned int size) { vector<int> resul...
剑指offer
C++
STL
vector
2019-09-18
3
1013
[剑指offer 编程题]替换空格
class Solution { public: void replaceSpace(char *str,int length) { string str_2 = ""; int plus_length = 0; for(int i = 0...
剑指offer
C++
2019-09-17
0
707
[剑指offer 编程题]二维数组中的查找
class Solution { public: bool Find(int target, vector<vector<int> > array) { //往下找发现下一个数已经大于我们所要找的target,往下寻找结束,寻找范围限制为此行以内; ...
剑指offer
C++
2019-09-17
0
551
[剑指offer 编程题]字符流中第一个不重复的字符
class Solution { public: //Insert one char from stringstream void Insert(char ch) { s += ch; } //return the first appearence ...
剑指offer
C++
2019-09-17
0
738