码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
[string]Longest Palindromic Substring
Total Accepted:82026Total Submissions:379898Difficulty:MediumGiven a stringS, find the longest palindromic substring inS. You may assume that the maxi...
分类:其他好文   时间:2015-12-07 22:48:22    阅读次数:294
(算法入门经典大赛 优先级队列)LA 3135(之前K说明)
A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line a...
分类:编程语言   时间:2015-12-07 20:30:34    阅读次数:223
[string]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-12-07 20:30:10    阅读次数:183
[LeetCode] Longest Valid Parentheses 解题思路
可以借助 stack 一次遍历就将全部有效括号替换为 '.'。 第一步:一次遍历,stack 只存放 '(' 的下标。     当找到一个 '(',则压进 stack ;     当找到一个 ')',则把 stack.top 对于的字符替换为 '.',并弹出 stack.pop()。耗时O(n...
分类:其他好文   时间:2015-12-06 17:47:28    阅读次数:139
求最长回文串
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-12-03 21:24:33    阅读次数:220
SPOJ - LIS2 Another Longest Increasing Subsequence Problem
cdq分治,dp(i)表示以i为结尾的最长LIS,那么dp的递推是依赖于左边的。因此在分治的时候需要利用左边的子问题来递推右边。(345ms? 区间树TLE/********************************************************** -...
分类:其他好文   时间:2015-12-02 09:09:20    阅读次数:492
LA-3135 - Argus(优先队列)
3135 - Argus A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensordata, Internet traffic, financial tic...
分类:其他好文   时间:2015-12-01 22:48:42    阅读次数:209
leetcode Find Median from Data Stream
题目连接https://leetcode.com/problems/find-median-from-data-stream/Find Median from Data StreamDescriptionMedian is the middle value in an ordered integer...
分类:其他好文   时间:2015-12-01 21:06:00    阅读次数:189
LintCode: Longest Common Substring
C++暴力搜索两个游标一个长度i遍历aj遍历blen遍历公共子串长度 1 class Solution { 2 public: 3 /** 4 * @param A, B: Two string. 5 * @return: the length of the lo...
分类:其他好文   时间:2015-12-01 14:28:03    阅读次数:168
[LeetCode]Longest Increasing Subsequence
public class Solution { public int lengthOfLIS(int[] nums) { int length = nums.length; List record = new ArrayList(); for (int...
分类:其他好文   时间:2015-12-01 09:41:45    阅读次数:168
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!