chenuo20012
chenuo20012
全部文章
分类
剑指offer题库(20)
归档
标签
去牛客网
登录
/
注册
chenuo20012的博客
全部文章
(共20篇)
二叉树中和为某一值的路径
class Solution {public: vector<vector<int> > FindPath(TreeNode* root,int expectNumber) { vector<vector<int> >res; ...
2020-03-17
0
358
二叉搜索树的后序遍历
class Solution {public: bool VerifySquenceOfBST(vector<int> sequence) { int n = sequence.size(); if(!n) return false...
2020-03-17
0
422
按之字型打印二叉树
include class Solution {public: vector<vector<int> > Print(TreeNode* pRoot) {</int> vector<int> resRow; vector<v...
2020-03-17
0
549
把二叉树打印成多行
include class Solution {public: vector<vector<int> > Print(TreeNode* pRoot) { vector<vector<int> >res; ...
2020-03-17
0
424
从上到下打印二叉树
include class Solution {public: vector<int> PrintFromTopToBottom(TreeNode* root) { vector<int> res; queue<TreeNode*>...
2020-03-16
0
347
栈的压入、弹出序列
include class Solution {public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { if(pushV.size()!=popV.size()) r...
2020-03-16
0
347
包含min函数的栈
include<assert.h> class Solution {public: void push(int value) { data.push(value); if(!minData.size()) minData.push(...
2020-03-16
0
423
顺时针打印矩阵
class Solution {public: vector<int> printMatrix(vector<vector<int> > matrix) { int m = matrix.size(); //行数 int n = ...
2020-03-15
0
386
对称的二叉树
/*struct TreeNode { int val; struct TreeNode left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { ...
2020-03-15
0
457
二叉树的镜像
class Solution {public: void Mirror(TreeNode *pRoot) { if(!pRoot) return; if(!pRoot->left && !pRoot->right) ...
2020-03-15
0
368
首页
上一页
1
2
下一页
末页