Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2016-08-29 06:53:36
阅读次数:
139
题目: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the ...
分类:
其他好文 时间:
2016-08-29 01:42:42
阅读次数:
141
Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: The director ...
分类:
其他好文 时间:
2016-08-26 06:40:19
阅读次数:
384
1.广播机制 标准广播: 标准广播(Normal broadcasts)是一种完全异步执行的广播,在广播发出之后,所有的广播接收器几乎都会在同一时刻接收到这条广播消息,因此它们之间没有任何先后顺序可言,它是无法被截断的。工作流程图: 有序广播: 有序广播(Ordered broadcasts)则是一 ...
分类:
移动开发 时间:
2016-08-25 23:33:15
阅读次数:
261
求最长回文子串的裸题,搞竞赛的时候遇到过各种花样的变式。
n方的朴素算法已经烂大街了,推荐使用O(n)的算法,只可惜很久没用过manacher算法,不会写了,所以花了一段时间温故知新。
manacher算法原理不了解的道友可以看这篇文章:...
分类:
其他好文 时间:
2016-08-24 15:54:14
阅读次数:
167
Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: The director ...
分类:
其他好文 时间:
2016-08-24 14:29:01
阅读次数:
192
Given two strings, find the longest common substring. Return the length of it. Example Given A = "ABCD", B = "CBCE", return 2. Given A = "ABCD", B = " ...
分类:
其他好文 时间:
2016-08-24 12:58:37
阅读次数:
145
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes ...
分类:
其他好文 时间:
2016-08-24 06:35:43
阅读次数:
197
依旧水题一道,两头往后滑动,用数组映射出现的字符就行。
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc",
which the length is 3.
...
分类:
其他好文 时间:
2016-08-23 22:11:25
阅读次数:
128
Given two strings, find the longest common subsequence (LCS). 最长公共子序列 Your code should return the length of LCS. Given two strings, find the longest c ...
分类:
其他好文 时间:
2016-08-23 22:02:59
阅读次数:
192