问题:看开源项目发现这个package-info.java文件有些特殊,从名字上面也可以猜出这个类是与package有关的。具体是怎么回事呢?:就是记录包的信息To
create a package comment file, you have a choice of two files to pl...
分类:
编程语言 时间:
2014-05-23 09:39:01
阅读次数:
328
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
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-05-23 07:43:23
阅读次数:
246
《对话LinusTorvalds:大多黑客甚至连指针都未理解》http://www.csdn.net/article/2013-01-10/2813559-two-star-programming“不懂指针”的开发者代码示例:
1 typedef struct node 2 { 3 ...
分类:
其他好文 时间:
2014-05-22 04:40:17
阅读次数:
245
/**根据完美二叉树或者非完美二叉树都可以,利用左右子树的根节点的next节点信息来连接next*/public void
connect(TreeLinkNode root){ if(root==null) return; //利用父节点的next...
分类:
其他好文 时间:
2014-05-22 03:03:39
阅读次数:
183
#include "stdafx.h"#include using namespace
std;int main(){ char c,d,e,f; printf("please input two characters:\n");
c=getchar(); putchar...
分类:
其他好文 时间:
2014-05-21 23:46:19
阅读次数:
352
1、
??
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num...
分类:
其他好文 时间:
2014-05-21 10:49:10
阅读次数:
221
There are two types of non-blocking thread synchronization algorithms
- lock-free, and wait-free. Their meaning is often confused. In lock-free systems, while any particular computation may be block...
分类:
其他好文 时间:
2014-05-21 10:27:20
阅读次数:
410
题目:不用乘、除、取模运算来实现除法。
减法可以实现除法在是我们早就知道的,但是可能会出现问题,比如极端情况,a = 0x7FFFFFFF,b = 1,求a/b,这要减法运算多少次?
回想下我们开始学习计算机的时候,涉及到的进制之间的转换,就是给定你一个十进制数,写出他的二进制,刚开始的时候很傻,就按着书上的方法去不停的除以2,除以2,除以2,。。。可笑的是居然天真的算过1024的二进制,更可...
分类:
其他好文 时间:
2014-05-21 08:32:30
阅读次数:
191
题目链接:12123 - Magnetic Train Tracks
题意:给定n个点,求有几个锐角三角形。
思路:和UVA 11529是同类的题,枚举一个做原点,然后剩下点根据这个原点进行极角排序,然后利用two pointer去遍历一遍,找出角度小于90度的锐角,然后扣掉这些得到钝角三角形的个数,然后在用总情况去扣掉钝角就是锐角或直角
代码:
#include
#include
#...
分类:
Web程序 时间:
2014-05-20 14:10:56
阅读次数:
412