Populating Next Right Pointers in Each NodeGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLi...
分类:
其他好文 时间:
2014-11-20 01:26:49
阅读次数:
145
/bin/ ,/sbin/,/usr/bin/,/usr/sbin/ 这四个目录都是和命令相关的目录,Liunx下命令就是一个可执行的二进制文件,这四个目录都有一个bin,binary的简写 二进制的意识。linux下绝大多数的命令都在这四个目录下/bin/ 存放系统命令的目录,普通用户和超级用户都...
分类:
系统相关 时间:
2014-11-20 01:25:42
阅读次数:
269
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...
分类:
其他好文 时间:
2014-11-20 01:16:54
阅读次数:
172
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 le...
分类:
其他好文 时间:
2014-11-19 23:46:55
阅读次数:
247
给定一个只含0和1的数组,求含1的最大矩形面积。Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.这样的题一般看来都...
分类:
其他好文 时间:
2014-11-19 23:44:02
阅读次数:
316
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:
其他好文 时间:
2014-11-19 20:18:28
阅读次数:
143
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-11-19 20:16:39
阅读次数:
190
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2014-11-19 20:16:31
阅读次数:
152
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:
其他好文 时间:
2014-11-19 18:31:49
阅读次数:
137
= =买了书才能做的题。。。就是按说明来搞就行了,没啥算法。。。注意要把以前的left,right设置为nullptr,不然就是有环了,代码中加黑部分。/** * Definition for binary tree * struct TreeNode { * int val; * ...
分类:
其他好文 时间:
2014-11-19 18:19:19
阅读次数:
168