604. Window Sum https://www.lintcode.com/problem/window-sum/description?_from=ladder&&fromId=1 自己写的方法: 九章的答案: ...
分类:
其他好文 时间:
2019-05-10 13:22:43
阅读次数:
121
1. 下面哪些是Thread类的方法() A start() B run() C exit() D getPriority() 答案:ABD 解析:看Java API docs吧:http://docs.oracle.com/javase/7/docs/api/,exit()是System类的方法, ...
分类:
编程语言 时间:
2019-05-09 23:54:28
阅读次数:
253
这个题目有两种做法, note: 注意head.random有可能是None的情况 1. S: O(n) create一个dictionary,然后先建dictionary和copy list以及next指针。然后再一遍,去建random指针。 2: S: O(1) 利用如下图所示的结构,然后再将c ...
分类:
其他好文 时间:
2019-05-04 11:55:30
阅读次数:
110
#define maxNodes 15 void createCSTree_Degree(CSTree &T, DataType e[], int degree[], int n) { //e层序序列,degree结点的度,n结点的个数 CSNode *pointer = new CSNode[ma... ...
分类:
其他好文 时间:
2019-05-03 13:08:02
阅读次数:
92
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy ...
分类:
其他好文 时间:
2019-05-02 09:37:35
阅读次数:
93
如下图所示,可以看到y的地址在传入函数并被返回后,高32位被截断了,于是发生了Segment fault。 首次是在MAC OS X上发现的,本以为是MAX OS X编译器自己的策略,后来在64位Ubuntu上测试结果一样。 究其原因,我们可以看到“assignment makes pointer ...
分类:
其他好文 时间:
2019-04-29 12:18:23
阅读次数:
156
2012-02-19 21:34:13 都是从源码下载然后自己修改,使用与TQ2440,之前uboot其实已经完成了。但是yaffs2没带起来。现在回头看来是很简单的了。bootargs参数中我设置成了ramdisk但是无法挂载yaffs2啦。修改了下就可以了。 安装配置QT4.8到是花费了大半天的 ...
分类:
其他好文 时间:
2019-04-27 13:17:06
阅读次数:
165
传送门 继续水板子题... #include <bits/stdc++.h> using namespace std; inline int read() { int x = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { ...
分类:
其他好文 时间:
2019-04-27 00:29:28
阅读次数:
151
传送门 继续水板子题... #include <bits/stdc++.h> using namespace std; inline int read() { int x = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { ...
分类:
其他好文 时间:
2019-04-27 00:26:18
阅读次数:
141
Mat is some kind of smart pointer for the pixels Mat a=b will have shared pixels for a and b. similar situation for push_back() if you need a 'deep co ...
分类:
其他好文 时间:
2019-04-25 15:55:49
阅读次数:
275