- 博客(4)
- 收藏
- 关注
转载 [LeetCode]Divide Two Integers
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT. Analysis We can use subtract to solv...
2015-05-18 22:20:00
138
转载 [LeetCode]Substring with concatenation of all words
Youaregivenastring,s,andalistofwords,words,thatareallofthesamelength.Findallstartingindicesofsubstring(s)insthatisaco...
2015-05-18 22:10:00
177
转载 Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter...
2015-05-17 00:41:00
109
转载 为什么JDK中String类的indexof不使用KMP或者Boyer-Moore等时间复杂度低的算法
今天在leetcode上刷题,正好刷到查找字符串的题目,想到了以前了解的KMP和Boyer-Moore等算法。这两个及其类似的算法的时间复杂度都接近于O(n)。 后面自己又去看了下JDK的String类中的indexof方法的实现,发现很奇怪,仅仅只是用了暴力破解法,也就是最原始的实现,时间复...
2015-05-16 23:07:00
535
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅