题目要求:First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]retur...
分类:
其他好文 时间:
2015-02-07 21:36:58
阅读次数:
178
First Missing PositiveGiven an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Yo...
分类:
其他好文 时间:
2015-02-07 20:17:25
阅读次数:
127
Spiral Matrix IIGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3,You should ret...
分类:
其他好文 时间:
2015-02-07 17:14:43
阅读次数:
82
题目描述:Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.分析:① 输入为VII,则数字为V + I +...
分类:
其他好文 时间:
2015-02-07 15:50:36
阅读次数:
150
题目描述:Integer to RomanGiven an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.罗马数字的计数方法:基本字符IVXLCDM相应...
分类:
其他好文 时间:
2015-02-07 15:41:19
阅读次数:
145
Problem Description
You are given N positive integers, denoted as x0, x1 ... xN-1. Then give you some intervals [l, r]. For each interval, you need to find a number x to make as small as possible!
Input
The first line is an integer T (T <= 10), indicat...
分类:
其他好文 时间:
2015-02-07 14:39:36
阅读次数:
205
java.lang 类 Integerjava.lang.Object java.lang.Number java.lang.Integer全部已实现的接口: Serializable, Comparable public final class Integerextends Number...
分类:
编程语言 时间:
2015-02-07 14:31:14
阅读次数:
162
题目描述:String to Integer (atoi)Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge,...
分类:
其他好文 时间:
2015-02-07 14:25:58
阅读次数:
127
题目描述:Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some g...
分类:
其他好文 时间:
2015-02-07 14:23:35
阅读次数:
153
题目描述:Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie...
分类:
其他好文 时间:
2015-02-07 14:22:19
阅读次数:
175