码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
LeetCode:Permutations II
Problems:Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following ...
分类:其他好文   时间:2015-06-12 16:41:11    阅读次数:71
LeetCode:Add Binary
problems: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100".class Solution {public: string...
分类:其他好文   时间:2015-06-12 16:40:21    阅读次数:71
Javascript中arguments的使用
function add(n1,n2){ return n1+n2; } function add(n1,n2,n3) { return n1+n2+n3; } alert(add(1,2));//N...
分类:编程语言   时间:2015-06-12 16:39:36    阅读次数:97
LeetCode:Permutations
Problem:Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3]...
分类:其他好文   时间:2015-06-12 16:39:01    阅读次数:81
尾调用
尾调用本文将以lua语言来描述。尾调用是函数式编程的一个概念,它是指某个函数的最后一步是调用另一个函数,例如:function f(x) return g(x) -- 尾调用end尾调用不一定出现在函数尾部,只要是最后一步操作即可,例如:function f(x) if (x > ...
分类:其他好文   时间:2015-06-12 16:38:07    阅读次数:134
快速排序,gcc亲测能用
#includevoid quick_sort(int a[],int left,int right){ int l = left; int r = right; int n = a[left]; if(left >= right) return; whi...
分类:编程语言   时间:2015-06-12 16:30:16    阅读次数:247
QSort函数对不同类型数据快速排序浅谈
一、对int类型数组排序int num[100];int cmp ( const void *a , const void *b ){return *(int *)a - *(int *)b;}qsort(num,100,sizeof(num[0]),cmp);二、对char类型数组排序(同int类...
分类:编程语言   时间:2015-06-12 14:40:02    阅读次数:197
leetcode之Contains Duplicate
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr...
分类:其他好文   时间:2015-06-12 13:07:15    阅读次数:99
第十九章,指针小练习(C++)
#include int main(int argc, char** argv) { int i = 1; int *n ; n=&i; std::cout<<"i为:"<<i<<std::endl; std::cout<<"n为:"<<n<<std::endl; std::cout<<"*n为:"<<*n<<std::endl; return 0; } 调试截图...
分类:编程语言   时间:2015-06-12 11:43:34    阅读次数:123
你真得懂Javascript中的==等于运算符吗?
var i = 2; Number.prototype.valueOf = function() { return i++; }; var a = new Number( 42 ); if (a == 2 && a == 3) { console.log( "Yep, this happened." ); } ============================ "0...
分类:编程语言   时间:2015-06-12 10:11:08    阅读次数:129
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!