Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
思路:最简单的方法就是按...
分类:
其他好文 时间:
2014-06-18 12:40:54
阅读次数:
265
题目
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only const...
分类:
其他好文 时间:
2014-06-18 11:53:39
阅读次数:
138
Problem Description
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.
The warehouse has N rooms. The i-th room con...
分类:
其他好文 时间:
2014-06-17 22:47:38
阅读次数:
300
问题:
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv7 armv7s)
解决:
Project ->Target->Build Setting ->搜索 Build Active Architecture Only ->把值改成NO...
分类:
其他好文 时间:
2014-06-17 22:20:22
阅读次数:
374
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
函数上指int div(int a ,intb) th...
分类:
其他好文 时间:
2014-06-17 21:53:41
阅读次数:
234
题目
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from th...
分类:
其他好文 时间:
2014-06-17 21:38:12
阅读次数:
193
Passing a large number of parameters is not convenient. A better approach is to substitute all the parameters with only one and make it an object.
分类:
编程语言 时间:
2014-06-17 20:40:07
阅读次数:
185
Since we only have one bag to pay for it is something that you will not miss.Its always wanted to fight a bag of coffee. See the code inside - dark al...
分类:
其他好文 时间:
2014-06-17 15:27:14
阅读次数:
204
//构造函数function Fn(name) { this.name = name; //属性,存放不同的东西}Fn.prototype.showName = function(){ //构造函数.prototype.方法,存放相同的东西,在内存中存放一份 alert(th...
分类:
其他好文 时间:
2014-06-17 12:54:21
阅读次数:
318