problem:
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.
Hide Tags
Tr...
分类:
其他好文 时间:
2015-04-21 11:20:10
阅读次数:
108
题目链接:Balanced Binary Tree
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 ...
分类:
其他好文 时间:
2015-04-17 18:17:21
阅读次数:
140
描述从根节点开始的递归深度优先搜索与树的前序遍历(preorder traversal)类似,是前序遍历的推广。从某个顶点V开始处理,然后递归地遍历所有与顶点V邻接的且没有被访问过的顶点。算法的基本思想如下:
假设图G初态为所有顶点未被访问(visited[i]=false),从G中任选一顶点vi :
从该顶点vi出发,首先访问vi,,置visited [vi ]=true;
然后依次搜索vi的每...
分类:
其他好文 时间:
2015-04-17 15:52:07
阅读次数:
217
Minimum Depth of Binary TreeTotal Accepted:50435Total Submissions:173043My SubmissionsQuestionSolutionGiven a binary tree, find its minimum depth.The ...
分类:
其他好文 时间:
2015-04-16 12:10:14
阅读次数:
125
题目链接:Maximum Depth of Binary Tree
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.
这道题...
分类:
其他好文 时间:
2015-04-16 10:25:57
阅读次数:
123
Maximum Depth of Binary TreeTotal Accepted:59837Total Submissions:132940My SubmissionsQuestionSolutionGiven a binary tree, find its maximum depth.The ...
分类:
其他好文 时间:
2015-04-14 16:09:07
阅读次数:
145
对于单通道字节型图像:
IplImage* img = cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1);
int height = img->height;
int width = img->width;
int step = img->widthStep;
uchar* data = (uchar *)img->...
分类:
其他好文 时间:
2015-04-14 13:03:04
阅读次数:
99
(1) 分配内存给一幅新图像:
IplImage* cvCreateImage( CvSize size, int depth, int channels );
size -图像宽、高.
depth -图像元素的位深度,可以是下面的其中之一:
IPL_DEPTH_8U - 无符号8位整型
IPL_DEPTH_8S - 有符号8位...
分类:
其他好文 时间:
2015-04-14 11:12:26
阅读次数:
284
Given the disparity d and 2D point (x, y) , we can derive the 3D depth using the 4-by-4 reprojection matrix Q as follows:The reprojection matrix Q is ...
分类:
其他好文 时间:
2015-04-14 07:17:41
阅读次数:
269
1.下载?? git clone --depth=14 https://github.com/angular/angular-phonecat.git 2.? git?checkout?-f?step-0 3.npm install? 安装package.json中的插件(包括grunt之类) 4.bower install(npm install -...
分类:
Web程序 时间:
2015-04-12 22:53:39
阅读次数:
247