码迷,mamicode.com
首页 >  
搜索关键字:longest    ( 2697个结果
【leetcode刷题笔记】Longest Valid Parentheses
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:其他好文   时间:2014-07-24 12:11:55    阅读次数:253
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 lo...
分类:其他好文   时间:2014-07-24 00:49:07    阅读次数:200
【leetcode刷题笔记】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...
分类:其他好文   时间:2014-07-23 16:19:41    阅读次数:234
leetCode解题报告5道题(六)
题目一:Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, ...
分类:其他好文   时间:2014-07-22 23:04:12    阅读次数:246
longest common substring
public static String lcs(String a, String b){ int aLen = a.length(); int bLen = b.length(); if(aLen==0 || bLen==0) return ""; if(a.char...
分类:其他好文   时间:2014-07-22 22:49:15    阅读次数:194
【leetcode刷题笔记】Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.题解:以strs[0]为模板,每次挨个查看是否所有的串里面是否第i位上都和strs[0]一样,如果都一样,把i位置上的字符放到a...
分类:其他好文   时间:2014-07-21 23:31:00    阅读次数:267
LeetCode:Longest Common Prefix
题目链接 Write a function to find the longest common prefix string amongst an array of strings. 题目的意思说的不是很清楚,开始理解成了求任意两个字符串的前缀中的最长者。但是本题的意思是求所有字符串的最长公共前缀,...
分类:其他好文   时间:2014-07-21 09:14:25    阅读次数:225
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 le...
分类:其他好文   时间:2014-07-21 09:07:24    阅读次数:207
编程算法 - 最长上升子序列问题 代码(C)
最长上升子序列问题 代码(C)本文地址: http://blog.csdn.net/caroline_wendy题目: 有一个长为n的数列a. 请求出这个序列中最长上升子序列的长度. 最长上升子序列的数字之间可以有间隔.即最长上升子序列(LIS, Longest Increasing Subsequence), 例如: n=5, a={4,2,3,1,5}, result=3(2,3,5).使用动...
分类:其他好文   时间:2014-07-20 22:34:43    阅读次数:297
hdu4570Multi-bit Trie (区间DP)
Problem Description   IP lookup is one of the key functions of routers for packets forwarding and classifying. Generally, IP lookup can be simplified as a Longest Prefix Matching (LPM) problem. That'...
分类:其他好文   时间:2014-07-20 10:18:28    阅读次数:235
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!