码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
leetcode - Maximum Depth of Binary Tree
题目: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 ro...
分类:其他好文   时间:2014-06-10 10:09:13    阅读次数:237
Leetcode:Longest Common Prefix 最长公共前缀
戳我去解题Write a function to find the longest common prefix string amongst an array of strings.class Solution {public: string longestCommonPrefix(vecto...
分类:其他好文   时间:2014-06-10 08:29:55    阅读次数:189
[LeetCode] Palindrome Partition [11]
题目:Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. 解题思路: 回文划分,题目意思是给一个字符串,找出将字符串划分为一系列回文子串的各种可能组合。例如,一个子串“aab“,你需要返回["aa","b"],["a","a","b"]。这个题目的解法也是非常的典型---循环加递归,...
分类:其他好文   时间:2014-06-09 23:24:11    阅读次数:256
Leetcode::Longest Common Prefix && Search for a Range
一次总结两道题,两道题目都比较基础Description:Write a function to find the longest common prefix string amongst an array of strings.分析: 这道题目最重要的知道什么叫prefix前缀, 否则一不小心就做...
分类:其他好文   时间:2014-06-09 21:08:16    阅读次数:224
LeetCode:Substring with Concatenation of All Words
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-09 17:49:34    阅读次数:240
T4 生成实体和简单的CRUD操作
1) { string after = field.Substring(1); result = first + after; } return result; ...
分类:其他好文   时间:2014-06-08 19:19:20    阅读次数:347
MySql 同一个列中的内容进行批量修改
问题重现: MySql 数据库中,一给列的内容中包括 “.wmv”     需要将 “.” 后的wmv格式 换为“flv” 解决办法 update video_info set file_path=substring(file_path,1,length(file_path)-3); 先执行以上SQL进行删除; update video_info set file_path =...
分类:数据库   时间:2014-06-08 16:38:39    阅读次数:262
Maximum Depth of Binary Tree
题目 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 方法 使用DFS对树进行遍...
分类:其他好文   时间:2014-06-08 10:26:33    阅读次数:207
js 判断字符串是否包含某字符串,String对象中查找子字符,indexOf
var Cts = "bblText";   if(Cts.indexOf("Text") > 0 ) {     alert('Cts中包含Text字符串'); } indexOf用法:  返回 String 对象内第一次出现子字符串的字符位置。         strObj.indexOf(subString[, startIndex])         参数  ...
分类:Web程序   时间:2014-06-08 05:00:36    阅读次数:300
[LeetCode] Longest Substring Without Repeating Characters [15]
题目: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 the length...
分类:其他好文   时间:2014-06-08 03:06:52    阅读次数:221
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!