码迷,mamicode.com
首页 >  
搜索关键字:return null    ( 92144个结果
Merge k Sorted Lists
Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.思路:合并k个有序链表为一个有序链表。我们可以用先合并两个链表的方法,然后逐个遍历链表数组,与上一个合并结束...
分类:其他好文   时间:2014-05-12 15:07:06    阅读次数:305
js:深入闭包(作用域:下)
function fn1(){   //创建了一个数组   var fns = new Array();   //i这个变量是保存在fn1这个作用域中   for(var i=0;i     //数组中的值是一组函数     fns[i] = function(){       return i;      }    }   return fns; } var fs =...
分类:Web程序   时间:2014-05-12 14:37:20    阅读次数:264
jQuery中json对象的复制(数组及对象)
摘自:http://www.2cto.com/kf/201306/218838.html1、jQuery自带的$.map方式:$.map(json, function (n) { return n; });这种方式原来用于复制数组还可以,今天用它复制数组中的某一条记录,发现字段名称丢失了,后来发现了...
分类:Web程序   时间:2014-05-12 13:30:24    阅读次数:437
ajax如何使用
500----服务器内部错误404----没有文件200----成功ajax里面这句必不可少xmlHttp.send(null);
分类:其他好文   时间:2014-05-12 10:22:51    阅读次数:212
LeetCode Maximal Rectangle
class Solution {public: int maximalRectangle(vector > &matrix) { int rows = matrix.size(); if (rows == 0) return 0; int cols =...
分类:其他好文   时间:2014-05-12 09:54:05    阅读次数:250
哪些值会被转化成false
undefined, null, -0, 0, NaN, ""
分类:其他好文   时间:2014-05-12 09:53:03    阅读次数:158
数论模版
//求gcd(a, b) LL gcd(LL a, LL b) { return b ? gcd(b, a%b) : a; }     //求整数x和y,使得ax+by=d, 且|x|+|y|最小。其中d=gcd(a,b) void gcd(LL a, LL b, LL& d, LL& x, LL& y) { if(!b) { d = a; x = 1; y = 0...
分类:其他好文   时间:2014-05-11 14:45:32    阅读次数:240
Leetcode | Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:其他好文   时间:2014-05-11 14:35:13    阅读次数:270
Java Socket编程readLine返回null,read返回-1的条件
客户端正常关闭socket的时候,服务器端的readLine()方法会返回null,或者read()方法会返回-1
分类:编程语言   时间:2014-05-10 22:27:48    阅读次数:522
LeetCode Insertion Sort List
class Solution {public: ListNode *insertionSortList(ListNode *head) { if (head == NULL) return NULL; ListNode* sorted_head = head; ...
分类:其他好文   时间:2014-05-10 20:39:14    阅读次数:419
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!