题目
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 to the...
分类:
其他好文 时间:
2014-06-18 12:05:44
阅读次数:
244
题目
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
In...
分类:
其他好文 时间:
2014-06-18 12:03:16
阅读次数:
227
题目21:有一分数序列:2/1,3/2,5/3,8/5,13/8,21/13...求出这个数列的前20项之和。
1.程序分析:请抓住分子与分母的变化规律。
2.程序源代码:
main()
{
int n,t,number=20;
float a=2,b=1,s=0;
for(n=1;n<=number;n++)
{
s=s+a/b;
t=a;a=a+b;b=t;/*这部分是程序的关键...
分类:
其他好文 时间:
2014-06-18 11:44:33
阅读次数:
176
Teradata数据库中也有和oracle类似的分析函数,功能基本一样。示例如下:RANK() 函数SELECT * FROM salestbl ORDER BY 1,2;storeid prodid sales----------- ------- ---------1001 ...
分类:
其他好文 时间:
2014-06-18 10:29:26
阅读次数:
272
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 nu...
分类:
其他好文 时间:
2014-06-18 10:17:40
阅读次数:
174
Kth number
Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4585 Accepted Submission(s): 1461
Problem Description
Give you a sequenc...
分类:
其他好文 时间:
2014-06-17 23:04:29
阅读次数:
246
题目
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would ...
分类:
其他好文 时间:
2014-06-17 22:39:41
阅读次数:
274
K-th Number
Time Limit: 20000MS
Memory Limit: 65536K
Total Submissions: 36045
Accepted: 11522
Case Time Limit: 2000MS
Description
You are working for Macrohard com...
分类:
其他好文 时间:
2014-06-17 22:17:07
阅读次数:
410
题目
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should rem...
分类:
其他好文 时间:
2014-06-17 22:15:52
阅读次数:
299
题目
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 ...
分类:
其他好文 时间:
2014-06-17 16:12:39
阅读次数:
226