Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down or right at...
分类:
其他好文 时间:
2014-06-13 20:36:56
阅读次数:
280
while loops
定义与实例
i = 0
numbers = []
while i < 6:
print "At the top i is %d" % i
numbers.append(i)
i = i + 1
print "Numbers now: ", numbers
print "At the bottom i is %d" % ...
分类:
编程语言 时间:
2014-06-11 00:59:17
阅读次数:
410
栈的定义
1, 栈是一种特殊的线性表
2,栈仅能在线性表的一端进行操作
3,栈顶(Top): 允许操作的一端 允许操作的一端
4,栈底(Bottom): ,不允许操作的一端 不允许操作的一端
这里我们实现了顺序栈和链式栈~~~~...
分类:
编程语言 时间:
2014-06-10 13:49:52
阅读次数:
265
网上已经有很多类似的记录了,这里写这个是给自己在项目中碰到的问题做个简单的记录,以后将持续更新1.IE67 border-bottom失效
一个a标签,想要使用移上去后会在下面显示一个横条,我用border-bottom做了一个效果,IE6
7必须加了line-height后才能显示,应该是因为没....
分类:
其他好文 时间:
2014-06-09 16:00:46
阅读次数:
209
【题目】
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],
[3,4],
[6,5,7],
[4,1,8,3]
]
The minimum path sum from top to...
分类:
其他好文 时间:
2014-06-08 17:52:45
阅读次数:
235
题目
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20...
分类:
其他好文 时间:
2014-06-08 09:23:34
阅读次数:
230
android 中使用Canvas的drawText绘制文本的位置,是基于基线的。如下图:
其中字母Q的小尾巴在横线下面了。
怎么样找准字母的中心位置呢?
先看下面的例子:(右边的数字,表示字体的 left, top, right, bottom)
这里面的关键是Paint.getTextBound。 getTextBound会填充一个Rect,这个Rect表示...
分类:
移动开发 时间:
2014-06-08 09:08:44
阅读次数:
279
Android中有时需动态设置控件四周的drawble图片,这个时候就需要调用
setCompoundDrawables(left, top, right,
bottom),四个参数类型都是drawableButton继承TextView,所以可以采用相同的设置方法方法一.XML方式方法二.JAVA...
分类:
移动开发 时间:
2014-06-08 01:17:39
阅读次数:
430
题目链接 Given a m x n grid filled with non-negative
numbers, find a path from top left to bottom right which minimizes the sum of
all numbers along its p...
分类:
其他好文 时间:
2014-06-07 21:59:08
阅读次数:
344
Given amxngrid filled with non-negative
numbers, find a path from top left to bottom right whichminimizesthe sum of all
numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-06-07 20:22:17
阅读次数:
264