原文链接:http://blog.csdn.net/rchm8519/article/details/48347797 redis.clients.util.Pool.getResource(Pool.Java:50)redis.clients.jedis.JedisPool.getResource ...
分类:
其他好文 时间:
2017-08-19 13:07:32
阅读次数:
306
题目: 输入一个链表,输出该链表中倒数第k个结点。 思路1: 代码1: 1 /* 2 struct ListNode { 3 int val; 4 struct ListNode *next; 5 ListNode(int x) : 6 val(x), next(NULL) { 7 } 8 };*/ ...
分类:
其他好文 时间:
2017-08-18 09:42:12
阅读次数:
225
biubiu~~~ 这道题就是预处理,我们就是枚举每一个数,找到左边比他大的数的个数以及其对应的区间,右边也如此,我们把左边的和右边的相乘就得到了我们的答案,我们发现这是O(n^3)的,但是实际证明他能A,分析证明他的时间复杂度是较小的,这个故事告诉我们,对于一些估计的时间复杂度,如果我们估计得太草 ...
分类:
其他好文 时间:
2017-08-13 20:10:59
阅读次数:
137
今天总结了一下学到的关于linux中进程的相关知识,下面是总结内容,希望对你帮助 一、当ELF格式的程序执行时,内核就产生一个名为task_struct{}的结构体来表示这个进程,这个结构体包括了进程的内存资源、CPU资源、文件、信号、各种锁资源等。 二、task_struct{}结构体的目录:/u ...
分类:
系统相关 时间:
2017-08-05 13:22:04
阅读次数:
266
1 #include<cstdio> 2 #include<iostream> 3 #include<cstring> 4 #define ls(x) (x->ch[0]) 5 #define rs(x) (x->ch[1]) 6 #define sz(x) (x->size) 7 #define ...
分类:
其他好文 时间:
2017-08-03 12:39:43
阅读次数:
172
题目原文 Selection in two sorted arrays. Given two sorted arrays a[] and b[], of sizes n1 and n2, respectively, design an algorithm to find the kth larges ...
分类:
编程语言 时间:
2017-08-02 15:07:54
阅读次数:
637
直接套公式+ 假设除去第k个人。 0, 1, 2, 3, ..., k-2, k-1, k, ..., n-1 //original sequence (1) 0, 1, 2, 3, ..., k-2, , k, ..., n-1 //get rid of kth person (2) k, k+1 ...
分类:
其他好文 时间:
2017-08-02 10:21:38
阅读次数:
116