Best Time to Buy and Sell Stock I II III
分类:
其他好文 时间:
2014-06-29 12:08:25
阅读次数:
275
Swift是什么?Swift是苹果于WWDC 2014发布的编程语言,The Swift
Programming Language的原话:Swift is a new programming language for iOS and OS X
apps that builds on the best...
分类:
移动开发 时间:
2014-06-16 09:58:24
阅读次数:
382
Question:Say you have an array for which
theithelement is the price of a given stock on dayi.Design an algorithm to find
the maximum profit. You may c...
分类:
其他好文 时间:
2014-06-12 19:55:05
阅读次数:
292
转载:http://jianshu.io/p/d00df35d2a2cQuora:What
are the best day-to-day time-saving hacks?在Twitter上关注原作者@Marius
Ursache在过去五年我不断尝试和调整各种提高生产力的技术,读了很多关于这方面...
分类:
其他好文 时间:
2014-06-11 10:55:49
阅读次数:
228
转自:http://www.oschina.net/translate/12-best-bootstrap-tools-for-web-designersBootstrap是一个非常棒的前端网站开发平台,它提供了大量的开发高体验的、高效的网站所需要的组件。这给网站开发人员与网站设计师提供了很好的便捷...
分类:
Web程序 时间:
2014-06-10 21:57:14
阅读次数:
458
12 Essential Bootstrap Tools for Web
DesignersPosted byvikason June 6, 2014, filed in:Tools,Web
Design原文地址:http://designzum.com/2014/06/06/12-best-boo...
分类:
Web程序 时间:
2014-06-10 00:59:10
阅读次数:
409
http://poj.org/problem?id=1699
题意:给出n个只含A,C,G,T的字符串,要求能把这n个字符串组合起来的最短长度。
思路:预处理一下,a[i][j]表示将第j个字符串连接到第i个字符串后面增加的长度,那么我们需要找出这样一个序列1,2....n满足a[1][2] + a[2][3] + ...+a[n-1][n]的最小值。DFS就OK了,任选一个字...
分类:
其他好文 时间:
2014-06-08 17:49:21
阅读次数:
199
【题目】
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.
...
分类:
其他好文 时间:
2014-06-08 15:11:58
阅读次数:
298
1. 普通的二分查找2. 查找最左边的值3. 查找最右边的值Worst case
performance: O(log n)Best case performance: O(1)Average case performance: O(log
n)Worst case space complexity...
分类:
其他好文 时间:
2014-06-07 11:19:48
阅读次数:
248