Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru...
分类:
其他好文 时间:
2014-07-22 22:52:33
阅读次数:
166
创建表: hive> CREATE TABLE pokes (foo INT, bar STRING); Creates a table called pokes with two columns, the first being an integer and the other a string....
分类:
其他好文 时间:
2014-07-22 22:50:54
阅读次数:
262
Eddy's picture
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 28 Accepted Submission(s) : 17
Font: Times New Roman | Verdana | Georgia
Fo...
分类:
其他好文 时间:
2014-07-20 10:14:16
阅读次数:
189
Determine whether an integer is a palindrome. Do this without extra space.
判断一个int值是否为回文数。
本题有几点需要注意:
(1)不能用额外存储空间,也就是说只能用常数空间解决;诸如将int转换为string再去比较字符是不可行的;
(2)判断回文数的方法有两个:从中间开始向两头判断、从两头向中间判断;后者更简...
分类:
其他好文 时间:
2014-07-19 23:22:39
阅读次数:
345
Robot MotionTime Limit: 1000 MS Memory Limit: 10000 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status] [Discuss]Descript...
分类:
其他好文 时间:
2014-07-19 16:19:18
阅读次数:
217
1. 框架定义: 2. color:颜色值,指定这个属性必须输入的是颜色值3. boolean:布尔值,指定这个属性必须输入的是boolean类型(true/false)4. dimension:尺寸值。注意,这里如果是dp那就会做像素转换为dip5. float:浮点值。6. integer:整....
分类:
其他好文 时间:
2014-07-19 12:24:47
阅读次数:
227
Description
Black Box
Our Black Box represents a primitive database. It can save an integer array and has a special
i variable. At the initial moment Black Box is empty and...
分类:
其他好文 时间:
2014-07-19 12:06:45
阅读次数:
199
Power of Fibonacci
Time Limit: 5 Seconds Memory Limit: 65536 KB
In mathematics, Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers of the following integer sequence...
分类:
其他好文 时间:
2014-07-19 11:48:45
阅读次数:
239
控制台读取输入数据import java.util.Scanner;public class HelloWorld{ public static void main(String args[]){ //int num = Integer.parseInt(args[0]); Scanner scan...
分类:
编程语言 时间:
2014-07-19 09:10:51
阅读次数:
199
Double 四舍五入保留小数:
/**
* @example roundUpNumber(20.47, 0) = 20.5, roundUpNumber(20.449, 1) = 20.45 * @description round up double number * @param Double d * @param Integer index * @return *...
分类:
其他好文 时间:
2014-07-19 08:08:55
阅读次数:
219