c7rious
c7rious
全部文章
题解
归档
标签
去牛客网
登录
/
注册
c7rious的博客
全部文章
/ 题解
(共21篇)
寻找树的子结构,C++
class Solution { public: bool HasSubtree(TreeNode* pRoot1, TreeNode* pRoot2) { if (pRoot2 == nullptr) return false; ...
剑指offer
c++
题解
树的子结构
2019-11-18
0
497
调整数组顺序,c++
class Solution { public: void reOrderArray(vector<int> &array) { int length = array.size(); int count = 0; queue...
剑指offer
c++
调整数组顺序
题解
2019-11-14
0
599
旋转数组最小数字,c++
class Solution { public: int minNumberInRotateArray(vector<int> rotateArray) { if (rotateArray.empty()) return 0; ...
剑指offer
c++
题解
旋转数组最小数字
2019-11-13
0
583
字符流中第一个不重复的字符C++
class Solution { public: //Insert one char from stringstream void Insert(char ch) { if(cimap.count(ch) == 0) cque.push...
剑指offer
c++
题解
字符流中第一个不重复的字符
2019-11-09
0
560
用两个栈实现队列,c++
class Solution { public: void push(int node) { stack1.push(node); } int pop() { // out栈清空 while (!stack2.empty())...
剑指offer
c++
题解
两个栈实现队列
2019-11-06
0
560
滑动窗口最大值,c++
class Solution { public: vector<int> maxInWindows(const vector<int>& num, unsigned int size) { vector<int> res; ...
剑指offer
c++
滑动窗口最大值
题解
2019-11-06
0
533
c++ 之字形打印树
class Solution { public: vector<vector<int> > Print(TreeNode* pRoot) { vector<vector<int>> res; if (pRoot ...
剑指offer
c++
之字形打印树
题解
2019-10-28
0
583
c++ 对称二叉树 广度优先搜索
class Solution { public: bool isSymmetrical(TreeNode* pRoot) { if (pRoot == nullptr) return true; vector<TreeNode*> tvec...
剑指offer
c++
对称二叉树
广度优先搜索
题解
2019-10-25
0
570
二叉树的下一个节点 c++
class Solution { public: TreeLinkNode* GetNext(TreeLinkNode* pNode) { if (pNode->right != nullptr) return findleftleaf(...
剑指offer
c++
二叉树的下一个节点
题解
2019-10-24
0
524
剑指offer 变态跳台阶 C++
class Solution { public: int jumpFloorII(int number) { vector<int> res{1}; int back = 0; int sum = 1; while(...
剑指offer
c++
变态跳台阶
题解
2019-10-23
0
475
首页
上一页
1
2
3
下一页
末页