string.capitalize() 字符串第一个字符大写 string.center(width,[,fill]) 原字符居中,空格填充至width长度 string.count(str,beg=0,end=len(string)) 获得字符串中某一个子串的数目,计算出现次数,可指定范围 ...
分类:
编程语言 时间:
2015-05-27 16:09:10
阅读次数:
360
原题链接:http://ac.jobdu.com/problem.php?pid=1407线段树,区间更新,查询区间最小值。注意区间更新,查询的时候,区间$\begin{align*}[L,R] \end{align*}$$\begin{align*}L \end{align*}$都可能大于$\be...
分类:
其他好文 时间:
2015-05-27 15:29:16
阅读次数:
116
删除链表的倒数第n个元素
思路一:先统计链表中节点的个数,然后再计算出倒数第n个是正数第多少个,再进行移除即可,但这样的话就不满足one pass的要求。(放弃)
思路二:p先跑n个节点,随后p,q一起跑,待p跑到链表尾部时,q节点刚好跑到需要移除的节点的前节点上, 然后进行跳过处理即可...
分类:
其他好文 时间:
2015-05-27 14:07:14
阅读次数:
174
原题链接:http://ac.jobdu.com/problem.php?pid=1554由数列的前缀和:$\begin{align*}\Large{} S_n &=\Large{}\sum_{i=1}^{n}{{a_i}} \ \ \ \ i=1,2,3...n\end{align*}$由于:$\...
分类:
其他好文 时间:
2015-05-27 11:47:54
阅读次数:
172
Remove Nth Node From End of ListTotal Accepted:54129Total Submissions:197759My SubmissionsQuestionSolutionGiven a linked list, remove thenthnode from ...
分类:
其他好文 时间:
2015-05-27 11:47:08
阅读次数:
114
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: Only one letter can be c...
分类:
编程语言 时间:
2015-05-27 11:36:20
阅读次数:
202
本文探讨fs 是否等于fs:0fs是段选择子,16位。
fs:x 是段寻址,寻找到的地址为32位,此值为fs指向的段段内偏移x处的地址。根据已知FS:0指向TEB
以此源码为例,windbg双调。.386
.model flat,stdcall
option casemap:none
.code
start:
int 3
nop
nop
end startwindbg捕获断点kd> !teb
T...
分类:
其他好文 时间:
2015-05-27 10:21:47
阅读次数:
287
Problem DescriptionAs this term is going to end, DRD needs to prepare for his final exams.DRD hasnexams. They are all hard, but their difficulties are...
分类:
其他好文 时间:
2015-05-27 00:57:14
阅读次数:
231
//类目#import //声明一个NSString的分栏@interface NSString (compareValue)- (NSComparisonResult)compareValue:(NSString *)string;@end-----------------------------...
分类:
其他好文 时间:
2015-05-26 20:52:21
阅读次数:
160
转载需声明:原文链接网址:http://www.artima.com/weblogs/viewpost.jsp?thread=221903
Java: Evolutionary Dead End
我在比利时安特卫普举办的Javapolis大会上刚做完一个主题演讲。现在是周五早上,前一天Josh Bloch作了发言,谈到了在closures(闭包)建议方面的争论。现在他就坐在...
分类:
编程语言 时间:
2015-05-26 19:00:42
阅读次数:
261