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-05 18:37:04
阅读次数:
188
public class A{private Vector aListeners = new Vector();private int value;public int getValue(){return value;}public void setValue(int newValue){if(va...
分类:
其他好文 时间:
2014-07-05 17:27:21
阅读次数:
245
Determine whether an integer is a palindrome. Do this without extra space.
Some
hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of converting the integer to string...
分类:
其他好文 时间:
2014-07-05 10:44:29
阅读次数:
227
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of...
分类:
其他好文 时间:
2014-07-04 07:35:58
阅读次数:
215
In this problem you are to generate a triangular wave form according to a specified pair of Amplitude and Frequency.
Input and Output
The input begins with a single positive integer on a line by i...
分类:
其他好文 时间:
2014-07-03 17:15:14
阅读次数:
204
[LeetCode]Roman to Integer...
分类:
其他好文 时间:
2014-07-03 16:45:05
阅读次数:
178
[LeetCode]Reverse Integer...
分类:
其他好文 时间:
2014-07-03 16:36:33
阅读次数:
121
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.int key[]={1000, 900, 500, 400, 100,90, 50, ...
分类:
其他好文 时间:
2014-07-03 12:06:47
阅读次数:
186
#if defined(__CHAR_UNSIGNED__) || defined(__sgi) #define INT1 signed char /* integer, signed 1 Byte */#define INT1_MIN SCHAR_MIN...
分类:
其他好文 时间:
2014-07-02 19:19:04
阅读次数:
346
procedure TMainForm.openForm(Caption, FormClassName: string);var i: integer; sheet: TUniTabSheet;begin for i := 0 to page.PageCount - 1 do begin ...
分类:
其他好文 时间:
2014-07-02 18:48:09
阅读次数:
224