Given an arraySofnintegers, find three integers
inSsuch that the sum is closest to a given number, target. Return the sum of the
three integers. You m...
分类:
其他好文 时间:
2014-05-23 03:21:10
阅读次数:
287
Determine whether an integer is a palindrome.
Do this without extra space.if use recursive, like check the first dig and last
dig, then remove them, c...
分类:
其他好文 时间:
2014-05-23 02:45:15
阅读次数:
230
【题目】
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
Each number in C may only be used once in the combination.
Note:
All numbers (including target) will be ...
分类:
其他好文 时间:
2014-05-21 15:55:25
阅读次数:
259
When you subtract two variables of type TIMESTAMP, you get an INTERVAL DAY TO SECOND which includes a number of milliseconds and/or microseconds depending on the platform. If the database is running o...
分类:
其他好文 时间:
2014-05-21 15:36:38
阅读次数:
488
【题目】
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen from C unlimited number of times.
Note:
All numbers (including target) w...
分类:
其他好文 时间:
2014-05-21 15:21:28
阅读次数:
292
参考别人的code, 看似不难的题,其实挺费事的。思想还是:From this example, we
can see that in the first position of the resulting combinations we can chose
number 1-5. Assume t...
分类:
其他好文 时间:
2014-05-21 14:24:04
阅读次数:
241
LightOJ 1307 Counting Triangles 二分查找 二分查找题,题意就是从集合中选长度拼三角形。其实就是暴力枚举两个边,然后第三个便就可以二分查找的方法从集合中找出来。当然集合要事先排好序。最后最坑爹的一点是数据int过不去,需要全部改成longlong。其他的就没什么了。大部分都是相同的代码。...
分类:
其他好文 时间:
2014-05-21 09:32:26
阅读次数:
331
题目:
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
Catch That Cow
Problem Description
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number li...
分类:
其他好文 时间:
2014-05-21 07:02:40
阅读次数:
312
本文正确性有待商榷,高手路过请不吝指教1.js中只有对象,包括对象,函数,常量等。对象不用解释。函数也有属性,常见之一就是prototype。常量也有属性:(3).__proto__;//Number
{}2.函数的prototype函数是一种特殊的对象,它可以直接通过小括号来执行自身代码。函数还有...
分类:
Web程序 时间:
2014-05-21 05:48:58
阅读次数:
347