Find 2 numbers with given sum in sorted array.
分类:
其他好文 时间:
2014-05-22 01:53:17
阅读次数:
288
#include "stdafx.h"#include using namespace
std;int main(){ char c,d,e,f; printf("please input two characters:\n");
c=getchar(); putchar...
分类:
其他好文 时间:
2014-05-21 23:46:19
阅读次数:
352
动机:想在Oracle中用一条SQL语句直接进行Insert/Update的操作。说明:在进行SQL语句编写时,我们经常会遇到大量的同时进行Insert/Update的语句,也就是说当存在记录时,就更新(Update),不存在数据时,就插入(Insert)。实战:接下来我们有一个任务,有一个表T,有...
分类:
数据库 时间:
2014-05-21 23:10:57
阅读次数:
356
Given a sorted array, remove the duplicates in
place such that each element appear onlyonceand return the new length.Do not
allocate extra space for a...
分类:
其他好文 时间:
2014-05-21 20:00:51
阅读次数:
296
#include #define N 8using namespace std;int main(){
int a[N]={1,-1,2,-3,4,-5,6,-7}; int lis[N]; int result[N];//结果 for(int i=0;i
a[j] && lis[i] =0;t--...
分类:
其他好文 时间:
2014-05-21 19:51:31
阅读次数:
351
1、
??
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num...
分类:
其他好文 时间:
2014-05-21 10:49:10
阅读次数:
221
There are two types of non-blocking thread synchronization algorithms
- lock-free, and wait-free. Their meaning is often confused. In lock-free systems, while any particular computation may be block...
分类:
其他好文 时间:
2014-05-21 10:27:20
阅读次数:
410
题目:不用乘、除、取模运算来实现除法。
减法可以实现除法在是我们早就知道的,但是可能会出现问题,比如极端情况,a = 0x7FFFFFFF,b = 1,求a/b,这要减法运算多少次?
回想下我们开始学习计算机的时候,涉及到的进制之间的转换,就是给定你一个十进制数,写出他的二进制,刚开始的时候很傻,就按着书上的方法去不停的除以2,除以2,除以2,。。。可笑的是居然天真的算过1024的二进制,更可...
分类:
其他好文 时间:
2014-05-21 08:32:30
阅读次数:
191
题目:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up t...
分类:
其他好文 时间:
2014-05-21 07:42:18
阅读次数:
230