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-06-04 20:13:41
阅读次数:
350
Given two sorted integer arrays A and B, merge
B into A as one sorted array.Note:You may assume that A has enough space (size
that is greater or equal...
分类:
其他好文 时间:
2014-06-04 18:18:08
阅读次数:
259
Given a roman numeral, convert it to an
integer.Input is guaranteed to be within the range from 1 to
3999.找到规则即可罗马数字的表示:I~1 V~5 X~10 L~50 C~100 D~500 ...
分类:
其他好文 时间:
2014-06-03 12:09:16
阅读次数:
210
Delphi(procedure&procedure .... of object
)函数指针与方法指针 .delphiobjectbuttonintegerdelphi中经常见到以下两种定义Type TMouseProc =
procedure (X,Y:integer); TMouseEvent...
分类:
其他好文 时间:
2014-05-31 15:46:53
阅读次数:
199
1.Integer转换成int的方法Integer i; int k =
i.intValue();即Integer.intValue();2.int转换成Integerint i;Integer it = new
Integer(i);3.String转换成int的方法String str = "...
分类:
编程语言 时间:
2014-05-31 08:27:30
阅读次数:
260
Evaluate the value of an arithmetic expression
inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an
integer or another express...
分类:
其他好文 时间:
2014-05-30 15:22:39
阅读次数:
301
原题地址:https://oj.leetcode.com/problems/subsets/题意:枚举所有子集。解题思路:碰到这种问题,一律dfs。代码:class
Solution: # @param S, a list of integer # @return a list of l...
分类:
编程语言 时间:
2014-05-30 04:31:09
阅读次数:
1243
1. 字符串有整型的相互转换Java12Stringa=String.valueOf(2);
//integer to numeric stringinti=Integer.parseInt(a);//numeric string to an int
2. 向文件末尾添加内容Java12345678...
分类:
编程语言 时间:
2014-05-29 20:27:11
阅读次数:
414
roman to integer and integer to roman in c++
分类:
编程语言 时间:
2014-05-29 01:40:36
阅读次数:
449
题目链接从代码的健壮性考虑,
应该顾及到把数字翻转后发生溢出的情况,但是此题中并没有这种测试数据。附上代码: 1 class Solution { 2 public: 3 int
reverse(int x) { 4 int tmp = abs(x); 5 i...
分类:
其他好文 时间:
2014-05-29 00:26:22
阅读次数:
243