码迷,mamicode.com
首页 >  
搜索关键字:number of islands    ( 27069个结果
[leetcode]Maximum Depth of Binary Tree
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:其他好文   时间:2014-07-31 23:19:10    阅读次数:259
2^x mod n = 1 【杭电-HDOJ-1395】 附题
/* 2^x mod n = 1 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11800    Accepted Submission(s): 3673 Problem Description Give a number n...
分类:其他好文   时间:2014-07-31 20:58:04    阅读次数:171
Leetcode--Two Sum
Problem Description: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they...
分类:其他好文   时间:2014-07-31 20:48:17    阅读次数:215
C++ 中int,char,string,CString类型转换
1. c++中string到int的转换1) 在C标准库里面,使用atoi:#include #include std::string text = "152"; int number = std::atoi( text.c_str() ); if (errno == ERANGE) //可能是s....
分类:编程语言   时间:2014-07-31 19:48:27    阅读次数:294
oracle如何修改字段类型(2)
在一次做开发的时候,遇到需要将数据表的字段类型由number改成varchar,可是该字段又有值,用 alter table t-name modify cname newType;会报错。话说,当时在网上没找到合适的解决办法,很苦恼!今天在博客园看到解决这个问题的办法,很nice,分享!当要修改的...
分类:数据库   时间:2014-07-31 19:42:07    阅读次数:227
angular学习笔记(二十六)-$http(4)-设置请求超时
本篇主要讲解$http(config)的config中的timeout项:$http({ timeout: number})数值,从发出请求开始计算,等待的毫秒数,超过这个数还没有响应,则返回错误demo:html: 18.4 $http(2) {{data}}js:var js...
分类:其他好文   时间:2014-07-31 19:34:27    阅读次数:9782
求最小的k个数
和快速排序有点类似,利用快速排序的划分算法, 划分算法见http://blog.csdn.net/buyingfei8888/article/details/8997803 根据int partition(int number[],int start,int end);返回值为数组下标,大小为index,index左边值均小于number【index】,右边均大于number【index】,若...
分类:其他好文   时间:2014-07-31 17:05:16    阅读次数:191
Oracle 中的replace函数的应用
replace 函数用法如下:replace('将要更改的字符串','被替换掉的字符串','替换字符串')oracle 中chr()函数CHR() --将ASCII码转换为字符 语法CHR(number_code)示例select CHR(116) from dual; --返回't'几个常用的ch...
分类:数据库   时间:2014-07-31 16:22:07    阅读次数:415
leetcode--012 single number I
1 public int singleNumber(int[] A) {2 int s=0;3 for(int i=0;i<A.length;i++){4 s=s^A[i];5 } 6 return...
分类:其他好文   时间:2014-07-31 16:13:26    阅读次数:184
递归函数你玩懂了吗?
/*   * php递归函数的用法  * 你玩过吗?  * 下面开始玩一玩  */ //自己调自己就是回调       实现了一个垒加2垒减2的效果 class digui{     public function index($number){          if($number>0) {              echo $number,"&nbsp;";  ...
分类:其他好文   时间:2014-07-31 13:32:26    阅读次数:142
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!