腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
Linux云计算网络
专栏之后会专注云计算领域,欢迎关注我的公众号 Linux云计算网络,第一时间见到干货
专栏成员
举报
178
文章
311093
阅读量
115
订阅数
订阅专栏
申请加入专栏
全部文章(178)
编程算法(58)
linux(31)
tcp/ip(25)
容器(20)
网络安全(16)
虚拟化(16)
容器镜像服务(10)
kubernetes(10)
数据处理(10)
c++(9)
二叉树(9)
数据结构(9)
云计算(9)
python(7)
存储(6)
kvm(6)
https(6)
node.js(5)
http(5)
date(5)
函数(5)
其他(4)
api(4)
string(4)
遍历(4)
源码(4)
安全(3)
traversal(3)
tree(3)
ios(2)
数据库(2)
打包(2)
github(2)
nginx(2)
NAT 网关(2)
网站(2)
开源(2)
运维(2)
udp(2)
socket编程(2)
nat(2)
binary(2)
map(2)
进程(2)
负载均衡(1)
区块链(1)
数字货币(1)
java(1)
javascript(1)
go(1)
.net(1)
jquery(1)
json(1)
汇编语言(1)
sql(1)
ide(1)
git(1)
unix(1)
负载均衡缓存(1)
人工智能(1)
混合云解决方案(1)
高性能计算(1)
分布式(1)
自动化(1)
缓存(1)
爬虫(1)
shell(1)
gui(1)
dns(1)
hashmap(1)
kernel(1)
windows(1)
物联网(1)
腾讯云开发者社区(1)
bluetooth(1)
console(1)
data(1)
double(1)
exec(1)
exit(1)
fork(1)
for循环(1)
function(1)
gps(1)
hash(1)
hashtable(1)
int(1)
line(1)
max(1)
memcpy(1)
mobile(1)
posix(1)
ps(1)
stack(1)
system(1)
target(1)
wait(1)
变量(1)
基础(1)
交换机(1)
链表(1)
路由器(1)
数组(1)
同步(1)
网关(1)
线程(1)
主机(1)
搜索文章
搜索
搜索
关闭
LeetCode:105_Construct Binary Tree from Preorder and Inorder Traversal | 根据前序和中序遍历构建二叉树 | Medium
二叉树
遍历
要求:通过二叉树的前序和中序遍历序列构建一颗二叉树 代码如下: 1 struct TreeNode { 2 int val; 3 TreeNode *left; 4 TreeNode *right; 5 TreeNode(int x): val(x),left(NULL), right(NULL) {} 6 }; 7 8 typedef vector<int>::iterator Iter; 9 TreeNode *bui
Linux云计算网络
2018-01-11
437
0
LeetCode: 106_Construct Binary Tree from Inorder and Postorder Traversal | 根据中序和后序遍历构建二叉树 | Medium
二叉树
遍历
要求:根据中序和后序遍历序列构建一棵二叉树 代码如下: 1 struct TreeNode { 2 int val; 3 TreeNode *left; 4 TreeNode *right; 5 TreeNode(int x): val(x),left(NULL), right(NULL) {} 6 }; 7 8 typedef vector<int>::iterator Iter; 9 10 TreeNode *bui
Linux云计算网络
2018-01-11
543
0
LeetCode:110_Balanced Binary Tree | 平衡二叉树 | Easy
二叉树
要求:判断一棵树是否是平衡二叉树 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1. 代码如下: 1 struct TreeNo
Linux云计算网络
2018-01-11
544
0
LeetCode:111_Minimum Depth of Binary Tree | 二叉树的最小深度 | Easy
二叉树
要求:此题正好和Maximum Depth of Binary Tree一题是相反的,即寻找二叉树的最小的深度值:从根节点到最近的叶子节点的距离。 结题思路:和找最大距离不同之处在于:找最小距离要注意
Linux云计算网络
2018-01-11
614
0
LeetCode:104_Maximum Depth of Binary Tree | 二叉树的最大深度 | Easy
二叉树
要求:求二叉树的深度(二叉树的深度为最远叶子节点到根节点的距离,即根节点到最远叶子节点的距离) Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 有两种求解的思路,一种采用DFS的思想,一种采用BFS的思想,如下代码所示: 1 struc
Linux云计算网络
2018-01-11
670
0
LeetCode:114_Flatten Binary Tree to Linked List | 将一棵二叉树变成链表的形式 | Medium
二叉树
编程算法
要求:Given a binary tree, flatten it to a linked list in-place.将二叉树转化为平坦序列的树。比如: 结题思路: 该题有个提示,转化后的树的序列
Linux云计算网络
2018-01-11
617
0
LeetCode:145_Binary Tree Postorder Traversal | 二叉树后序遍历 | Hard
二叉树
编程算法
题目:Binary Tree Postorder Traversal 二叉树的后序遍历,题目要求是采用非递归的方式,这个在上数据结构的课时已经很清楚了,二叉树的非递归遍历不管采用何种方式,都需要用到栈结构作为中转,代码很简单,见下: 1 struct TreeNode { 2 int val; 3 TreeNode* left; 4 TreeNode* right; 5 TreeNode(int x): val(x), left(N
Linux云计算网络
2018-01-11
450
0
LeetCode:144_Binary Tree Preorder Traversal | 二叉树的前序遍历 | Medium
二叉树
binary
traversal
tree
遍历
题目:Binary Tree Preorder Traversal 二叉树的前序遍历,同样使用栈来解,代码如下: 1 struct TreeNode { 2 int val; 3 TreeNode* left; 4 TreeNode* right; 5 TreeNode(int x): val(x), left(NULL),right(NULL) {} 6 }; 7 8 vector<int> preorderTravers
Linux云计算网络
2018-01-11
483
0
LeetCode:94_Binary Tree Inorder Traversal | 二叉树中序遍历 | Medium
二叉树
binary
traversal
tree
遍历
题目:Binary Tree Inorder Traversal 二叉树的中序遍历,和前序、中序一样的处理方式,代码见下: 1 struct TreeNode { 2 int val; 3 TreeNode* left; 4 TreeNode* right; 5 TreeNode(int x): val(x), left(NULL),right(NULL) {} 6 }; 7 8 vector<int> preorderTr
Linux云计算网络
2018-01-11
450
0
没有更多了
社区活动
【纪录片】中国数据库前世今生
穿越半个世纪,探寻中国数据库50年的发展历程
立即查看
Python精品学习库
代码在线跑,知识轻松学
立即查看
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档