http://jingyan.baidu.com/article/046a7b3efd165bf9c27fa915.html https://www.kafan.cn/edu/1541581.html Find find /usr /home /tmp -iname "*.jar" (1.多个目录 ...
分类:
系统相关 时间:
2016-09-28 16:20:29
阅读次数:
211
A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde ...
分类:
其他好文 时间:
2016-09-28 16:20:25
阅读次数:
157
您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以下操作:翻转一个区间,例如原有序序列是5 4 3 2 1,翻转区间是[2,4]的话,结果是5 2 3 4 1 这种动态维护数列的题目一般都可以用splay做; 具体方法是加一个lazy标记,然后往下find的时候的时候交换一下 ...
分类:
其他好文 时间:
2016-09-28 15:59:15
阅读次数:
149
275. To xor or not to xor 275. To xor or not to xor The sequence of non-negative integers A1, A2, ..., AN is given. You are to find some subsequence A ...
分类:
其他好文 时间:
2016-09-28 15:23:14
阅读次数:
149
用String类中的indexOf函数,例如:String str="we find out sth";if(str.indexOf("o") 1){ //等于-1表示这个字符串中没有o这个字符//do something}else{//do something} ...
分类:
Web程序 时间:
2016-09-28 15:22:46
阅读次数:
126
笨办法学Python第40节,上次用的第三版的书,这次是第四版的书。 这一节的代码如下: 运行结果: 这一节最重要的是两句话: cities['_find'] = find_citycity_found = cities['_find'](cities,state) 对这两句话的分析在书的下一节,在 ...
分类:
编程语言 时间:
2016-09-28 15:05:32
阅读次数:
147
Given an integer array of size n, find all elements that appear more than ? n/3 ? times. The algorithm should run in linear time and in O(1) space. 思路 ...
分类:
其他好文 时间:
2016-09-28 07:38:50
阅读次数:
118
Given an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times. You may assume that the ...
分类:
其他好文 时间:
2016-09-28 07:37:32
阅读次数:
100
题目描述 把只包含因子2、3和5的数称作丑数(Ugly Number)。例如6、8都是丑数,但14不是,因为它包含因子7。 习惯上我们把1当做是第一个丑数。求按从小到大的顺序的第N个丑数。 反思:我发现有些题目,你如果不是之商超群的那一类人,如果不经过大量的训练是很难做出来的(也可能是自己智商该充值 ...
分类:
其他好文 时间:
2016-09-28 07:36:43
阅读次数:
135
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at ...
分类:
其他好文 时间:
2016-09-28 07:36:37
阅读次数:
116