problem:
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5,
...
分类:
其他好文 时间:
2015-04-10 18:02:27
阅读次数:
99
public int maxArea(int[] height) { //http://blog.csdn.net/linhuanmars/article/details/21145429 贪心算法要看看 if(height==null || height.len...
分类:
其他好文 时间:
2015-04-10 13:30:50
阅读次数:
77
感觉和Container With Most Water很像,这里有个问题,如果让球最大的坑,怎么做呢?还有candy那道题,好像都是这种双扫系列的refhttp://fisherlei.blogspot.com/2013/01/leetcode-trapping-rain-water.html双扫...
分类:
移动开发 时间:
2015-04-10 13:00:09
阅读次数:
153
Problem DescriptionGiven a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first lin...
分类:
Web程序 时间:
2015-04-09 23:45:07
阅读次数:
145
题目:我的解法: 1 def checkio(text): 2 import string 3 str = text.encode().lower() 4 adict = {} 5 for i in string.lowercase[::-1]: 6 ...
分类:
其他好文 时间:
2015-04-09 21:34:13
阅读次数:
138
在Stack Overflow上有这样的一个贴子《What’s your most controversial programming opinion?》,翻译成中文就是“你认为最有争议的编程观点是什么?”,不过,在400多个主回贴,以及千把个子回贴中,好像并不是很有争议,而是令人相当的茅塞顿开,下...
分类:
系统相关 时间:
2015-04-09 19:47:38
阅读次数:
334
Druid 的load 数据分为两类 :批量load(历史数据) 和实时load(新数据) ,本文介绍批量load 数据indexing 服务批量load 数据需要用到indexing 服务,它是一个独立的服务,,接受任务的形式为POST请求。The output of most tasks are...
分类:
其他好文 时间:
2015-04-09 15:14:19
阅读次数:
226
Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie...
分类:
其他好文 时间:
2015-04-09 06:08:10
阅读次数:
147
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), desi...
分类:
其他好文 时间:
2015-04-08 18:16:49
阅读次数:
131
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5, and A is now [1,1,2,...
分类:
其他好文 时间:
2015-04-08 18:08:31
阅读次数:
118