Given an array where elements are sorted in
ascending order, convert it to a height balanced BST./** * Definition for binary
tree * public class TreeN...
分类:
其他好文 时间:
2014-06-11 21:58:10
阅读次数:
300
saveImgGroup的大小由里面的图片决定。注:saveBitmapData=new
BitmapData(saveImgGroup.width,saveImgGroup.height,true,0);saveBitmapData.draw(saveImgGroup);最后保存的图片的大小是由s...
分类:
其他好文 时间:
2014-06-11 09:05:38
阅读次数:
268
Given a singly linked list where elements are
sorted in ascending order, convert it to a height balanced BST.public class
Solution { /** Convert th...
分类:
其他好文 时间:
2014-06-10 00:22:44
阅读次数:
259
第一种方法,暴力求解,从当前向左右两个方向扫描比自己小的,然后计算面积,时间复杂度O(n^2)code如下,但是在LeetCode上回超时。
1 class Solution { 2 public: 3 int largestRectangleArea(vector &height) {
4...
分类:
其他好文 时间:
2014-06-08 21:24:07
阅读次数:
328
1 【1】 //new的操作相当于根据类的定义在内存中创建一块独立的区域 2
//所以两个对象修改各自的属性不受影响。 3 4 Person p1 = new Person(); 5 p1.Height = 1...
分类:
其他好文 时间:
2014-06-08 21:16:45
阅读次数:
332
原文:div中显示某个网页 1.方法
2.ajax方法ajax+流实现无框架限制块刷新:主框架index页面:js:$(function(){$("#dialog").dialog({
width:500, height:550});$("#dialog").openDialog();$("#dia...
分类:
Web程序 时间:
2014-06-08 20:35:47
阅读次数:
329
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
android:layout_width="wrap...
分类:
其他好文 时间:
2014-06-08 17:58:54
阅读次数:
633
今天在群里面,有人抛出了一个关于css中margin-right没有效果的问题。CSS代码和HTML代码如下:
.style1{
width:400px;
height:440px;
background-color:red;
border:5px solid silver;
margin-top:20%;
margin-right:30%;
}...
分类:
其他好文 时间:
2014-06-08 17:38:27
阅读次数:
204
先给大家来个干活^~^,学习Python的一个好网站,http://learnpythonthehardway.org/book/
经典例子
下面是几个老经典的例子喽,刚接触Python的可以敲一敲,看看结果喽!
my_name='Zed A. Shaw'
my_age=35#not a lie
my_height=74#inches
my_weight=180#1bs
my_eye...
分类:
编程语言 时间:
2014-06-08 17:15:58
阅读次数:
369
做手机Web开发做浏览器兼容用到了,所以在网上找了些汇总下。alert($(window).height()); //浏览器当前窗口可视区域高度
alert($(document).height()); //浏览器当前窗口文档的高度 alert($(document.body).height());...
分类:
Web程序 时间:
2014-06-07 20:10:32
阅读次数:
312