摘要:
Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent ... 阅读全文
摘要:
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo... 阅读全文
摘要:
题目2 : Professor Q's Software时间限制:10000ms单点时限:1000ms内存限制:256MB描述Professor Q develops a new software. The software consists of N modules which are numbe... 阅读全文
摘要:
看Thinking in Java中内部类的一章,有内部类和静态内部类,书中把后者叫做嵌套类。常见用法实例:一般内部类(非静态) 1 public class InnerClassTest { 2 public static void main(final String args[]) { ... 阅读全文
摘要:
要求是不使用sizeof,一开始写了个看似可以,但是有问题的方法:long* a = NULL;long* b = a + 1;int n = (char*)b - (char*)a;这个方法等价于sizeof(long),但这其实有问题,在32位编译器上编译得到的代码在64位机器上得到的结果还是n... 阅读全文