1.感受一下深搜代码 1 void Set_01(int k){ 2 if(k==MAXN){ 3
Print_ans(k); 4 return; 5 } 6 for(int i=0;i<2;i++){ 7 ans[k]=i; ...
分类:
其他好文 时间:
2014-06-29 15:12:54
阅读次数:
197
Given an arraySofnintegers, are there
elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in
the array which gives the sum of ...
分类:
其他好文 时间:
2014-06-29 15:08:56
阅读次数:
263
public function findfile($arr) { $files = array();
foreach ($arr as $file) { $child = glob($file."/*"); ...
分类:
其他好文 时间:
2014-06-29 15:05:49
阅读次数:
200
Given a linked list, swap every two adjacent
nodes and return its head. For example, Given 1->2->3->4, you should
return the list as 2->1->4->3. Your ...
分类:
其他好文 时间:
2014-06-29 14:39:10
阅读次数:
268
同时适合IE、firefox、谷歌浏览器下适用,经过筛选代码如下//禁用右键、文本选择功能、复制按键$(document).bind(“contextmenu”,function(){return
false;});$(document).bind(“selectstart”,function(){...
分类:
Web程序 时间:
2014-06-29 14:38:07
阅读次数:
251
function test(){return
"hello";}alert(test);这个显示是变量test的值,它正好是个函数,这是第一个警告对话框显示的结果:function
test(){return "hello";}alert(test());圆括号()告诉它执行函数test,并显示它的...
分类:
Web程序 时间:
2014-06-29 14:21:45
阅读次数:
271
class Solution {public: int
lengthOfLastWord(const char *s) { if (s == NULL) return 0; int mlen = 0, len =
0; bool inword = fa...
分类:
其他好文 时间:
2014-06-29 14:13:37
阅读次数:
229
在CL里我们可以这样:1 $ sbcl2 * (+ 1 2 3)3 64 * ( 2
template 3 bool cmp(O o, A a,B b){ 4 return o(a, b); 5 } 6 template 7 bool cmp(O
o,A a,B b,C... c){ 8 ...
分类:
编程语言 时间:
2014-06-07 04:42:31
阅读次数:
270
Merge k sorted linked lists and return it as
one sorted list. Analyze and describe its complexity.
对每一个排序链表都设置一个指针。每次讲指针指向的单元中最小值链接,直到所有指针为空。 public c...
分类:
其他好文 时间:
2014-05-28 09:59:54
阅读次数:
263
函数实际上是对象,每个函数都是Function类型的实例。函数是引用类型。函数名实际上是一个执行函数对象的指针,不会与某个函数绑定。//
这种写法更能表达函数的本质var sum = function(num1, num2) { return num1 + num2;};var
another...
分类:
编程语言 时间:
2014-05-28 09:17:47
阅读次数:
454