Problems:Write a function to find the longest common prefix string amongst an array of strings.就是返回一个字符串数组的所有的公共前缀。不难。我是已第一个字符串为参考,然后依次遍历其他的字符串,一旦遇到不同...
分类:
其他好文 时间:
2014-10-16 02:35:11
阅读次数:
215
[leetcode]
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with th...
分类:
其他好文 时间:
2014-10-15 11:42:20
阅读次数:
224
Source:https://oj.leetcode.com/problems/longest-common-prefix/Write a function to find the longest common prefix string amongst an array of strings.Hi...
分类:
编程语言 时间:
2014-10-14 00:46:47
阅读次数:
306
String apppath = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase; //获取整个文件路径名
apppath = apppath.Substring(0, apppath.LastIndexOf(@"\")); //去掉/后面的程序名
MessageBox.Show(apppath);
...
Palindrome Partitioning
Total Accepted: 21056 Total
Submissions: 81036My Submissions
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all...
分类:
其他好文 时间:
2014-10-13 11:18:20
阅读次数:
173
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:
其他好文 时间:
2014-10-12 17:54:08
阅读次数:
177
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-10-12 17:16:38
阅读次数:
155
Js的substring和C#的Substring的作用都是从一个字符串中截取出一个子字符串,但它们的用法却有非常大的不同,下边我们来比較看看:Js的substring语法:程序代码String.substring(start, end)说明:返回一个从start開始到end(不包括end)的子字符...
分类:
Web程序 时间:
2014-10-11 23:33:37
阅读次数:
218
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest...
分类:
其他好文 时间:
2014-10-11 14:52:35
阅读次数:
167
Js的substring和C#的Substring的作用都是从一个字符串中截取出一个子字符串,但它们的用法却有非常大的不同,下边我们来比較看看:Js的substring语法:程序代码String.substring(start, end)说明:返回一个从start開始到end(不包括end)的子字符...
分类:
Web程序 时间:
2014-10-11 13:03:55
阅读次数:
189