码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
【Longest Valid Parentheses】cpp
题目:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the long...
分类:其他好文   时间:2015-05-12 20:40:49    阅读次数:88
LeetCode:Binary Tree Right Side View
题目描述: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For example: Given the following binary tr...
分类:其他好文   时间:2015-05-12 17:09:43    阅读次数:75
Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. class Solution { public: string longestCommonPrefix(vector& strs) { if(strs.size()==0) return ""; ...
分类:其他好文   时间:2015-05-12 09:37:20    阅读次数:112
Longest Palindromic Substring
public class Solution { public String longestPalindrome(String s) { if (s == null || s.length() == 0) { return null; } ...
分类:其他好文   时间:2015-05-12 09:16:55    阅读次数:161
求两个字符串最长公共子串
一.问题描述:最长公共子串(LCS-Longest Common Substring)LCS问题就是求两个字符串最长公共子串的问题。比如输入两个字符串"ilovechina"和“chinabest”的最长公共字符串有"china",它们的长度是5.二.解法解法就是用一个矩阵来记录两个字符串中所有位置...
分类:其他好文   时间:2015-05-12 01:21:18    阅读次数:108
Leetcode Longest Valid Parentheses
我的错误代码: 1 #include 2 3 using namespace std; 4 5 int longestValidParentheses(string s) 6 { 7 int i = 0; 8 int L = s.length(); 9 int j;10 ...
分类:其他好文   时间:2015-05-11 12:54:52    阅读次数:96
Longest Valid Parentheses
Longest Valid Parentheses问题:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses sub...
分类:其他好文   时间:2015-05-11 12:27:10    阅读次数:110
Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:其他好文   时间:2015-05-11 12:14:42    阅读次数:116
[LeetCode 3] Longest Substring Without Repeating Characters
https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length of the longest substring without repeati...
分类:其他好文   时间:2015-05-10 23:36:51    阅读次数:159
【Longest Common Prefix】cpp
题目:Write a function to find the longest common prefix string amongst an array of strings.代码:class Solution {public: string longestCommonPrefix(vect...
分类:其他好文   时间:2015-05-10 18:56:18    阅读次数:109
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!