码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
LeetCode Maximum Depth of Binary Tree
1.题目描述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.2.解决方案1class Solution { public:...
分类:其他好文   时间:2015-03-06 11:22:23    阅读次数:126
oracle sql优化
第一掌 避免对列的操作任何对列的操作都可能导致全表扫描,这里所谓的操作包括数据库函数、计算表达式等等,查询时要尽可能将操作移至等式的右边,甚至去掉函数。例1:下列SQL条件语句中的列都建有恰当的索引,但30万行数据情况下执行速度却非常慢:select * from record where subs...
分类:数据库   时间:2015-03-05 22:10:37    阅读次数:307
IOS 集合视图指南1:介绍
About iOS Collection Views(关于IOS集合视图) A collection view is a way to present an ordered set of data items using a flexible and changeable layout. The most common use for collection views is to pre...
分类:移动开发   时间:2015-03-05 17:10:46    阅读次数:181
[leetcode] Longest Substring Without Repeating Characters
Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, the ...
分类:其他好文   时间:2015-03-05 16:15:49    阅读次数:104
LeetCode[String]: Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. 这个题目非常简单,只要弄清楚题意就可以非常快地解决,我的C++代码实现如下: string longestCommonPrefix(vector &strs) { if (strs.empt...
分类:其他好文   时间:2015-03-04 19:13:18    阅读次数:127
HDU 1403 Longest Common Substring(后缀数组啊 求最长公共子串 模板题)
HDU 1403 Longest Common Substring(后缀数组啊 求最长公共子串 模板题)...
分类:编程语言   时间:2015-03-04 19:08:31    阅读次数:161
leetcode Longest Substring Without Repeating Characters
代码: 1 #include 2 3 using namespace std; 4 5 int lengthOfLongestSubString(string s) 6 { 7 if (s.length() == 0) 8 return 0; 9 int max ...
分类:其他好文   时间:2015-03-04 18:52:52    阅读次数:104
四道简单DP
DP类题目找到子问题(状态),然后找到转移方程,就OK#dp#likes matrixchain#according to two point's distance to recurrenceclass Solution: # @return a string def longest...
分类:其他好文   时间:2015-03-04 18:51:45    阅读次数:122
【LeetCode从零单排】No104 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.代码/** * Definition for binary tree * p...
分类:其他好文   时间:2015-03-04 17:08:21    阅读次数:118
Longest Palindromic Substring *
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...
分类:其他好文   时间:2015-03-04 09:44:51    阅读次数:122
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!