码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
【poj3764】 The xor-longest Path
[http://poj.org/problem?id=3764] (题目链接) 今天的考试题,看到异或就有点虚,根本没往正解上想。。 题意:给出一棵带权树,请找出树上的一条路径,使其边上权值的异或和最大。 solution 首先我们考虑从根向下dfs,记录下每个点i到根上权值的异或和val[i]。根 ...
分类:其他好文   时间:2016-09-28 15:53:07    阅读次数:166
295. Find Median from Data Stream
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two ...
分类:其他好文   时间:2016-09-27 13:08:46    阅读次数:132
leetcode 3. Longest Substring Without Repeating Characters
本问题是求最长不重复子串。 给出一种方法: 例如:aplsdfgsjiuk,设置一个最长子串的起始位和结束位,a为起始位,b为结束位,当遍历aplsdfg时,下一位s重复,所以可以从d为起始位置在遍历。 时间复杂度为O(n)。 ...
分类:其他好文   时间:2016-09-27 11:29:14    阅读次数:95
freeCodeCamp:Find the Longest Word in a String
找到提供的句子中最长的单词,并计算它的长度。 函数的返回值应该是一个数字。 ...
分类:其他好文   时间:2016-09-26 17:41:25    阅读次数:97
leetcode--5. Longest Palindromic Substring
题目来自 https://leetcode.com/problems/longest-palindromic-substring/ 题目:Given a string S, find the longest palindromic substring in S. You may assume tha ...
分类:其他好文   时间:2016-09-25 17:26:09    阅读次数:149
[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 ...
分类:其他好文   时间:2016-09-24 23:20:25    阅读次数:137
洛谷P1458 顺序的分数 Ordered Fractions
P1458 顺序的分数 Ordered Fractions P1458 顺序的分数 Ordered Fractions P1458 顺序的分数 Ordered Fractions 151通过 203提交 题目提供者该用户不存在 标签USACO 难度普及- 提交 讨论 题解 最新讨论 暂时没有讨论 题 ...
分类:其他好文   时间:2016-09-24 13:36:47    阅读次数:141
Lesson17 The longest suspension bridge in the world
Verrazano, an Italian about whom little is known, sailed into New York Harbour in 1524 and named it Angouleme. He described it as 'a very agreeable si ...
分类:其他好文   时间:2016-09-24 13:26:29    阅读次数:114
128. Longest Consecutive Sequence(leetcode)
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 longes ...
分类:其他好文   时间:2016-09-24 11:54:09    阅读次数:132
128. Longest Consecutive Sequence
...
分类:其他好文   时间:2016-09-24 10:37:45    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!