SHL、SHR、SAL、SAR: 移位指令
;SHL(Shift Left): 逻辑左移
;SHR(Shift Right): 逻辑右移
;SAL(Shift Arithmetic Left): 算术左移
;SAR(Shift Arithmetic Right): 算术右移
;其中的 SHL 和 SAL 相同, 但 SHR 和 SAR 不同...
分类:
其他好文 时间:
2014-06-03 03:21:11
阅读次数:
365
1、
??
Construct Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in...
分类:
其他好文 时间:
2014-06-03 03:13:59
阅读次数:
195
J - Tree
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld
& %llu
Submit Status
Appoint description:
System Crawler (2014-05-16)
Description
Tree
...
分类:
其他好文 时间:
2014-06-03 03:06:52
阅读次数:
359
网上有关于二叉数的java实现http://blog.csdn.net/skylinesky/article/details/6611442
多数案例都没有键值,有键值的也全是整型。我用java实现了一个可以任何对象为键的二叉数
package Tree;
import java.io.IOException;
public class Tree ,V> {
@SuppressW...
分类:
编程语言 时间:
2014-06-03 00:14:07
阅读次数:
297
1、Maximum Depth of Binary Tree
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 leaf node.
clas...
分类:
其他好文 时间:
2014-06-02 23:13:22
阅读次数:
290
【题目】
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
【题意】
给定一个由0和1填充的二维矩阵,找一个全是1的最大矩形
【思路】
扫描二维矩阵,凡是扫到值为1的块时候,以当前块为矩形的左上角区块拓展,找最大矩阵。
先找出以每个“1”区块为左上角区块的最大矩形,然后求出最大全局的最大矩...
分类:
其他好文 时间:
2014-06-02 23:08:07
阅读次数:
289
当一个组件tree在一个postbacks请求中被恢复之后其中每个组件从request的参数中取得各自的值,这里使用的是processDecodes方法。这个值会保存在本地的每个组件中,在源码中此过程的代码较为简单,因为实现者将取值这个操作全部封装在processDecodes方法中。不过说实话JSF的这部分的实现非常失败,因为在UIViewRoot中有将近两千行代码,这,这,这……...
分类:
移动开发 时间:
2014-06-02 23:05:34
阅读次数:
363
思路:在自定义shape中增加一层或多层,并错开,即可显示阴影效果。为增加立体感,按钮按下的时候,只设置一层。我们可以通过top, bottom, right 和 left 四个参数来控制阴影的方向和大小。关系图以下自定义两种阴影效果:res/drawable-hdpi/shadow1.xml
...
分类:
移动开发 时间:
2014-06-01 11:18:34
阅读次数:
320
1.垂直居中有时我们会使用margin: 0
auto;作居中使用。但有的时候我们需要垂直居中,例如在div里面垂直居中显示一张加载中的gif图。下面这种写法就可以完美实现:垂直居中的子容器 {
position: absolute; left: 0; right: 0; ...
分类:
Web程序 时间:
2014-05-31 20:15:24
阅读次数:
261
1.清除浮动下面是两种常用的方式,而这两招也够用了(不用千招会,只需一招精)。1.结尾处加空div标签clear:both
Left Right 缺点:每次清除浮动都加空div,影响了HTML的结构,例如如果要算div的个数,都会被影响到。2.父级div定义伪类:after...
分类:
Web程序 时间:
2014-05-31 20:02:28
阅读次数:
332