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 diffe...
分类:
其他好文 时间:
2014-06-19 11:23:05
阅读次数:
204
// 0. 加载原有图片
UIImage *image = [UIImage imageNamed:icon];
// 1.创建图片上下文
CGFloat margin = border;
CGSize size = CGSizeMake(image.size.width + margin, image.size.height + margin);
...
分类:
其他好文 时间:
2014-06-16 12:44:07
阅读次数:
202
Description :Given a singly linked list where
elements are sorted in ascending order, convert it to a height balanced
BST.分析:这道题目简单版是把一个排序好的数组转成平衡的二叉树...
分类:
其他好文 时间:
2014-06-16 10:51:54
阅读次数:
237
Given an array where elements are sorted in
ascending order, convert it to a height balanced BST.递归,二分法。 1 /** 2 *
Definition for binary tree 3 * st.....
分类:
其他好文 时间:
2014-06-16 00:33:31
阅读次数:
252
1.android
弹出的软键盘遮挡住EditText文本框的解决方案:把Activit对应的布局文件filename.xml文件里的控件用比重设置布局。(例如:android:layout_weight="31")并且尽可能把高度设置成自适应的:android:layout_height="wra...
分类:
移动开发 时间:
2014-06-13 15:46:32
阅读次数:
406
在head标签中加入以上meta声明。具体属性可以谷歌/百度。
我查了下viewport,有几个属性:width - viewport的宽度 height - viewport的高度initial-scale -
初始的缩放比例minimum-scale - 允许用户缩放到的最小比例maximum-...
分类:
移动开发 时间:
2014-06-12 10:24:54
阅读次数:
430
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-06-12 08:10:28
阅读次数:
194