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 to m + n) to hold additional elements fro...
分类:
其他好文 时间:
2015-01-08 09:43:18
阅读次数:
169
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca...
分类:
其他好文 时间:
2015-01-08 09:41:06
阅读次数:
187
function GenerateVerifyCode(var code:string):TBitmap;var I,j,k: Integer; vPoint: TPoint; vLeft: Integer; arrStr:array [1..36]of string ; vc...
创建一个类模块,粘贴如下代码:
'大整数结构体
Private Type LARGE_INTEGER
LowPart As Long
HighPart As Long
End Type
'获取时间计数器计数值
Private Declare Function QueryPerformanceCounter _
Lib "kernel32" (...
分类:
其他好文 时间:
2015-01-08 00:56:56
阅读次数:
273
Given an integer n, return the number of trailing zeroes in n!.
Note: Your solution should be in logarithmic time complexity.
Credits:
Special thanks to @ts for adding this problem and creating all...
分类:
编程语言 时间:
2015-01-07 23:42:23
阅读次数:
401
function GetDeviceType(var OsName, BrowserName: string; var IsMobileDevice: Boolean): string;var I: Integer; BrowserInfo: string; OSTypes, BrowserT...
分类:
移动开发 时间:
2015-01-07 23:32:11
阅读次数:
300
LARGE_INTEGER tima,timb;QueryPerformanceCounter(&tima);在 Windows Server 2003 和 WindowsXP 中使用 QueryPerformanceCounter 函数的程序可能执行不当QueryPerformanceCounte...
分类:
其他好文 时间:
2015-01-07 23:24:59
阅读次数:
182
原题链接: https://oj.leetcode.com/problems/reverse-integer/
做法直接看代码,无需对负数做特殊处理。但是必须考虑溢出的情况,考虑溢出的判断则将res * 10 + num % 10
class Solution {
public:
int reverse(int x) {
int num = x;
...
分类:
其他好文 时间:
2015-01-07 16:49:51
阅读次数:
142
classTestL
{
publicstaticvoidmain(String[]args)
{
inti=60;
Stringbinary=Integer.toBinaryString(i);
System.out.println(binary);
Stringhex=Integer.toHexString(i);
System.out.println(hex);
intj=i&15;
Stringk1=(i<=9)?j+"":(char)(j-10+..
分类:
其他好文 时间:
2015-01-07 15:09:56
阅读次数:
130
var gStart, gLength, gCol: Integer;procedure SetRichEdit(aRichEdit: TRichEdit);var fRow, fCol: Integer; fStart, fLength, tStart: Integer;begin fRow :=...
分类:
其他好文 时间:
2015-01-07 14:30:58
阅读次数:
152