Js的substring和C#的Substring的作用都是从一个字符串中截取出一个子字符串,但它们的用法却有非常大的不同,下边我们来比較看看:Js的substring语法:程序代码String.substring(start, end)说明:返回一个从start開始到end(不包括end)的子字符...
分类:
Web程序 时间:
2014-07-16 23:20:43
阅读次数:
313
class Solution {public: int longestConsecutive(vector &num) { int len = num.size(); int max_cons = 0; int cur_cons = 0...
分类:
其他好文 时间:
2014-06-30 14:19:28
阅读次数:
159
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-06-30 13:21:00
阅读次数:
202
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.Solution:public class Solution { public ...
分类:
其他好文 时间:
2014-06-30 12:18:25
阅读次数:
255
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-06-29 20:28:58
阅读次数:
183
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-06-27 23:13:24
阅读次数:
218
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-06-27 12:48:10
阅读次数:
238
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...
分类:
其他好文 时间:
2014-06-27 12:46:45
阅读次数:
238
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatena...
分类:
其他好文 时间:
2014-06-27 12:44:16
阅读次数:
226
题目
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once an...
分类:
其他好文 时间:
2014-06-27 10:24:26
阅读次数:
219