码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
LeetCode – Refresh – Longest Valid Parentheses
Notes:Do not forget to clean the total and rec. 1 class Solution { 2 public: 3 int longestValidParentheses(string s) { 4 int len = s.size(...
分类:其他好文   时间:2015-03-20 09:12:56    阅读次数:119
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:其他好文   时间:2015-03-20 09:12:38    阅读次数:107
LeetCode – Refresh – Longest Substring Without Repeating Characters
For this problem, we are OK to use hash set, since no numbers are needed. 1 class Solution { 2 public: 3 int lengthOfLongestSubstring(string s) { ...
分类:其他好文   时间:2015-03-20 09:09:30    阅读次数:101
LeetCode – Refresh – Longest Substring with At Most Two Distinct Characters
At first beginning, I was trying to use hash set to record the characters. But I found that was wrong.Because if there are couple same chars, when you...
分类:其他好文   时间:2015-03-20 08:06:07    阅读次数:164
LeetCode – Refresh – Longest Common Prefix
Seach one by one. 1 class Solution { 2 public: 3 string getNext(const string& s1, const string& s2) { 4 int len = min(s1.size(), s2.size()...
分类:其他好文   时间:2015-03-20 08:06:00    阅读次数:121
LeetCode – Refresh – Longest Palindromic Substring
O(n2): 1 class Solution { 2 public: 3 string getP(string s, int start, int end) { 4 while (start >= 0 && end result.size()) result = s1;1...
分类:其他好文   时间:2015-03-20 08:05:24    阅读次数:123
LeetCode – Refresh – Longest Consecutive Sequence
It use the hashset to do the tricks. 1 class Solution { 2 public: 3 int longestConsecutive(vector &num) { 4 int len = num.size(), result =...
分类:其他好文   时间:2015-03-20 08:02:46    阅读次数:146
Longest Consecutive Sequence
https://leetcode.com/problems/longest-consecutive-sequence/Given an unsorted array of integers, find the length of the longest consecutive elements se...
分类:其他好文   时间:2015-03-19 21:38:49    阅读次数:164
AWR元数据的迁移或导入到其他数据库
我们可以将AWR元数据迁移(导入)到其他数据库,低版本的导入到高版本,再用高版本的数据库生成AWR报告,也能使用一些新特性,如 SQL ordered by Physical Reads (UnOptimized) SQL ordered by User I/O Wait Time   导出: testnode:/home/oracle$export ORACLE_SID=wy1 te...
分类:数据库   时间:2015-03-19 10:17:12    阅读次数:236
LeetCode 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.思路分析:这题比较简单,关于树的题目通常都可以用递归解决,这题也不例外,递归解法的思...
分类:其他好文   时间:2015-03-19 06:23:34    阅读次数:126
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!