码迷,mamicode.com
首页 >  
搜索关键字:maximum repetition s    ( 4177个结果
【POJ3693】Maximum repetition substring 后缀数组恶心题
题意: 给一个字符串,然后找一个子串,使子串满足其中连续重复子串最多。 比如ababab,重复次数为3,ababa,重复次数为1(abab是两次) 恶心在于还要输出最小字典序。 题解网上都有,不发了。 代码: #include #include #include #include #define N 101000 #define LOGN 20 #define...
分类:编程语言   时间:2015-01-13 15:58:20    阅读次数:256
Maximum Depth of Binary Tree
https://oj.leetcode.com/problems/maximum-depth-of-binary-tree/Given a binary tree, find its maximum depth.The maximum depth is the number of nodes alo...
分类:其他好文   时间:2015-01-13 14:13:55    阅读次数:105
Java-Maximum Gap
Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. Return 0 if the array contains less than 2 elements. Y...
分类:编程语言   时间:2015-01-12 22:34:27    阅读次数:274
LeetCode--Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4,?1,2,1,?5,4], the contiguous subarray [4,?1,2,1] ha...
分类:其他好文   时间:2015-01-12 13:07:22    阅读次数:149
[ACM] ZOJ 3844 Easy Task (模拟+哈希)
Easy Task Time Limit: 2 Seconds      Memory Limit: 65536 KB You are given n integers. Your task is very easy. You should find the maximum integer a and the minimum integer b among these n inte...
分类:其他好文   时间:2015-01-11 20:24:46    阅读次数:242
leetcode 152. Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:其他好文   时间:2015-01-11 12:11:44    阅读次数:133
[LeetCode#104, 111]Maximum Depth of Binary Tree, Minimum Depth of Binary Tree
The problem 1: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 t...
分类:其他好文   时间:2015-01-11 06:07:49    阅读次数:216
[LeetCode#]
The problem:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree,...
分类:其他好文   时间:2015-01-11 00:59:13    阅读次数:287
Maximum Depth of Binary Tree
求树的深度...
分类:其他好文   时间:2015-01-10 16:41:38    阅读次数:94
POJ2479,2593: 两段maximum-subarray问题
虽然是两个水题,但是一次AC的感觉真心不错这个问题算是maximum-subarray问题的升级版,不过主要算法思想不变:1. maximum-subarray问题maximum-subarray就是找到数组A[1....n]中的连续子数组A[i.....j]并且A[i]+...+A[j]和最大。当...
分类:其他好文   时间:2015-01-10 16:32:04    阅读次数:135
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!