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-21 21:41:20
阅读次数:
252
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-21 18:34:47
阅读次数:
167
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 13:39:29
阅读次数:
113
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
引例:迷宫问题首先我们来想象一只老鼠,在一座不见天日的迷宫内,老鼠在入口处进去,要从出口出来。那老鼠会怎么走?当然可以是这样的:老鼠如果遇到直路,就一直往前走,如果遇到分叉路口,就任意选择其中的一条继续往下走,如果遇到死胡同,就退回到最近的一个分叉路口,选择另一条道路再走下去,如果遇到了出口,老鼠的...
分类:
其他好文 时间:
2014-11-19 20:30:06
阅读次数:
215
环境:eclipse,ndkr8,opengl es2.0,android
最近使用eclipse和NDK进行android opengl es2.0的开发,发现了绘制的物体显示与深度无关,而与绘制的前后顺序有关。想了一下,应该是深度测试没有开启,开启了glEnable(GL_DEPTH_TEST),但是发现深度测试还是不起作用。网上查询了一下,原因是eclipse创建的窗...
分类:
移动开发 时间:
2014-11-19 10:55:33
阅读次数:
232
可能是因为我是按难度顺序刷的原因,这个其实在之前的几道题里面已经写过了。题目如下: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path...
分类:
其他好文 时间:
2014-11-15 21:31:17
阅读次数:
194
Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ide...
分类:
其他好文 时间:
2014-11-15 11:13:11
阅读次数:
171