码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
Longest Increasing Subsequence
https://leetcode.com/problems/longest-increasing-subsequence/#/solutions http://www.cnblogs.com/grandyang/p/4938187.html http://www.cnblogs.com/Edward ...
分类:其他好文   时间:2017-06-30 18:56:43    阅读次数:276
P1807 最长路_NOI导刊2010提高(07)
题目描述 设G为有n个顶点的有向无环图,G中各顶点的编号为1到n,且当为G中的一条边时有i < j。设w(i,j)为边的长度,请设计算法,计算图G中<1,n>间的最长路径。 输入输出格式 输入格式: 输入文件longest.in的第一行有两个整数n和m,表示有n个顶点和m条边,接下来m行中每行输入3 ...
分类:其他好文   时间:2017-06-29 23:51:30    阅读次数:202
[leetcode]3. Longest Substring Without Repeating Characters
题目: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the ...
分类:其他好文   时间:2017-06-29 22:36:58    阅读次数:183
Python中的lambda、map、filter、reduce、zip
lambda lambda是匿名函数,也就是没有名字的函数。lambda的语法非常简单: 下面是一个lambda表达式的简单例子: 注意:我们可以把lambda表达式赋值给一个变量,然后通过这个变量来使用它。 下图是定义lambda表达式和定义一个普通函数的对比: 注意: 使用lambda表达式并不 ...
分类:编程语言   时间:2017-06-29 20:42:25    阅读次数:244
Longest Palindromic Substring
1 public class Solution { 2 /** 3 * @param s input string 4 * @return the longest palindromic substring 5 */ 6 public static String longestPalindrome(... ...
分类:其他好文   时间:2017-06-29 15:20:16    阅读次数:187
[LeetCode]14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. 写一个函数找到最长的公共前缀在所有的字符串数组中。 例如 "aba" "abbb" "abcc" "ab" 它们的公共前缀就是 ...
分类:其他好文   时间:2017-06-29 09:58:59    阅读次数:113
[LeetCode]5. Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Input: "babad" Output: "b ...
分类:其他好文   时间:2017-06-29 09:56:52    阅读次数:197
[LeetCode]3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:其他好文   时间:2017-06-29 09:56:19    阅读次数:154
[Leetcode] 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 ...
分类:其他好文   时间:2017-06-28 18:53:13    阅读次数:160
[leetcode-300-Longest Increasing Subsequence]
Given an unsorted array of integers, find the length of longest increasing subsequence. For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest inc ...
分类:其他好文   时间:2017-06-27 15:02:24    阅读次数:138
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!