1、
??
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 subt...
分类:
其他好文 时间:
2014-05-23 08:19:19
阅读次数:
282
Ext.onReady(function () {
var win = new Ext.Window({
title: "个人资料",
width: 500,
height: 320,
plain: true,
la...
1、
??
Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
分析:将一个升序排列的链表转换为平衡二叉搜索树,采用递归的方式,先找到链表...
分类:
其他好文 时间:
2014-05-22 12:33:30
阅读次数:
270
原文地址:http://leihuang.net/2014/05/18/Dynamic-Memory-Allocation/
什么是动态内存分配
我们知道数组的元素存储在内存中连续的位置。当一个数组声明的时候,它的内存在编译是被分配。同样,你也能利用动态内存分配来使得内存在运行时分配。
Why Use Dynamic Allocation
当你声明一个数组的时候,数组的大小...
分类:
其他好文 时间:
2014-05-22 08:33:06
阅读次数:
274
内容涉及:php、分页、jquery、div+css实例下载:http://download.csdn.net/detail/roro5119/7373905index.php延迟加载"
alt="" width="200" height="200">数据正在加载...异步文件:" alt="" w...
分类:
Web程序 时间:
2014-05-22 03:09:04
阅读次数:
387
最近写了几个网站,在这先抓狂一下!写网站的过程中涉及到iframe的高度自适应问题,特将解决过程记录如下:刚开始以为将height="100%"即可完成自适应,实际不然。正确解决办法:
分类:
其他好文 时间:
2014-05-22 02:32:10
阅读次数:
184
Dynamic programming and meta-programming to
calculate Fib arrays.
分类:
其他好文 时间:
2014-05-22 01:42:39
阅读次数:
341
#include #include const int GRID_WIDTH = 1024;const
int GRID_HEIGHT = 800;#pragma comment(lib, "osgd.lib")#pragma comment(lib,
"osgViewerd.lib")#pragm...
分类:
其他好文 时间:
2014-05-21 20:31:39
阅读次数:
555
今天编写代码如下:发现2个radiobutton居然都可以选中。这我真的晕了。。后来偶然发现原来是没有设置Id的原因。。。
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizont...
分类:
其他好文 时间:
2014-05-21 17:12:25
阅读次数:
246
给定一个向量,其中的每个元素代表了高度,比如height[3] = 5,说明在坐标轴中在点3处存在高度为5的竖线,这样所有的元素就形成一个琴状的形状,最后要求的就是两条竖线之间的矩形形状最大的面积。最直觉的做法就是穷举,这样的复杂度是O(n2),显然还有更合适的方法,因为在这样的方法中有很多确定要小的面积也进行了计算。关于面积有两个变量,一个是横轴之间的距离,;另一个是两条竖轴之间的距离。我们可以固定其中一个变量,很显然,我们可以先取最远的两条竖线进行比较,然后使两个辅助指针逐渐缩小,取两个辅助指针中的较小...
分类:
其他好文 时间:
2014-05-20 15:44:28
阅读次数:
227