码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
【leetcode刷题笔记】Pascal's Triangle II
Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(...
分类:其他好文   时间:2014-07-19 19:05:27    阅读次数:174
【leetcode刷题笔记】Sqrt(x)
Implementint sqrt(int x).Compute and return the square root ofx.题解:二分的方法,从0,1,2.....x搜索sqrt(x)的值。代码如下: 1 public class Solution { 2 public int sqrt...
分类:其他好文   时间:2014-07-19 17:37:22    阅读次数:196
二级链动
protected void btnSend_Click(object sender, EventArgs e) { if (this.ddlSendName.SelectedValue == "-1") { Response.Write(""); return; } } protected vo....
分类:其他好文   时间:2014-07-19 17:35:22    阅读次数:164
phpexcel读1
canRead($filePath)){$PHPReader = new PHPExcel_Reader_Excel5();if(!$PHPReader->canRead($filePath)){echo '未发现Excel文件!';return;}}//不需要读取整个Excel文件而获取所有工作表...
分类:Web程序   时间:2014-07-19 17:11:52    阅读次数:214
sort()和优先队列的总结
一、关于sort函数sort()排序函数默认是从小到大,a={5,3,2,1,6 };sort(a,a+n);//输出是1 2 3 5 6?这里如果要从到小排序,则有两种方式可以满足(1)写一个cmp()函数,定义大小关系bool cmp(int a,int b){return a>b;}a={5,...
分类:其他好文   时间:2014-07-19 17:11:10    阅读次数:248
php各种验证类
= $min) ? true : false;break;case 2: //只匹配最大值return ($max >= $len) ? true : false;break;default: //min = 1000 && $timeArr[0] = 0 && $dateArr[1] = 0 &&...
分类:Web程序   时间:2014-07-19 17:07:29    阅读次数:286
扩展欧几里得模板
1 LL Ex_GCD(LL a,LL b,LL &x,LL& y) 2 { 3 if(b==0) 4 { 5 x=1; 6 y=0; 7 return a; 8 } 9 LL g=Ex_GCD(b,a%b,x,y);...
分类:其他好文   时间:2014-07-19 17:04:57    阅读次数:249
18位身份证号验证及信息获取
止乎于分享!IDCode18 = { validate: function (value) { if (value.length != 18) return false; var value = value.toLowerCase(); var sum...
分类:其他好文   时间:2014-07-19 16:24:38    阅读次数:230
LeetCode Generate Parentheses
class Solution {public: vector generateParenthesis(int n) { string str; vector res; dfs(n, 0, 0, str, res); return res;...
分类:其他好文   时间:2014-07-19 15:28:21    阅读次数:207
[LeetCode] Palindrome Partitioning II
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
分类:其他好文   时间:2014-07-19 00:05:43    阅读次数:200
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!