A man can fail many times, but he isn't a failure until he begins to blame somebody else.—— J. Burroughs一个人可以失败许多次,但是只要他没有开始责怪别人,他还不是一个失败者。——巴勒斯
分类:
其他好文 时间:
2014-07-16 23:20:38
阅读次数:
203
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's...
分类:
其他好文 时间:
2014-06-27 18:22:07
阅读次数:
191
我这段时间在用redis,感觉挺方便的,但比较疑惑在选择内存数据库的时候到底什么时候选择redis,什么时候选择memcache,然后就查到下面对应的资料,是来自redis作者的说法(stackoverflow上面)。 You should not care too much about per.....
分类:
其他好文 时间:
2014-06-27 16:02:52
阅读次数:
253
How many prime numbersTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7352 Accepted Submission(s)...
分类:
其他好文 时间:
2014-06-26 21:05:55
阅读次数:
209
Today,it`s my first day to start a new lesson with c#!At first ,I want to study it just because java is a old language ,and run slower than c# many pe...
分类:
其他好文 时间:
2014-06-26 16:46:23
阅读次数:
191
csapp page124. practice problem 2.35/* Determine whether arguments can be multiplied without overflow */int tmult_ok(int x, int y){ int p = x*y; ...
分类:
其他好文 时间:
2014-06-25 12:47:24
阅读次数:
230
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2014-06-25 09:17:03
阅读次数:
159
几天前纠结了一个蛋疼的问题,在go里面函数式支持可变参数的,譬如...T,go会创建一个slice,用来存放传入的可变参数,那么,如果创建一个slice,例如a,然后以a...这种方式传入,go会不会还会新建一个slice,将a的数据全部拷贝一份过去?如果a很大,那么将会造成很严重的性能问题,不过后来想想,可能是自己多虑了,于是查看go的文档,发现如下东西:Passing arguments to...
分类:
其他好文 时间:
2014-06-24 20:21:59
阅读次数:
240
【题目】
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). H...
分类:
其他好文 时间:
2014-06-24 19:40:53
阅读次数:
240
I won't forget Ki-kun until the day I forget Ki-kun — Mafuyu Shiina , Life is never too short to try again! — Kurimu Sakurano It's not that the world....
分类:
其他好文 时间:
2014-06-24 15:16:16
阅读次数:
210