码迷,mamicode.com
首页 >  
搜索关键字:maximum repetition s    ( 4177个结果
HDU ACM 1530 Maximum Clique->最大团
分析:最大团的模版题,DFS深搜。 #include using namespace std; #define N 55 int map[N][N]; int set[N]; int max; bool IsConnect(int end,int v) { int i; for(i=0;i<end;i++) if(!map[set[i]][v]) return false; ...
分类:其他好文   时间:2015-05-01 13:27:54    阅读次数:157
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 leaf node. 题意:求树的高度。 思路:就是递归。 /** * Definiti...
分类:其他好文   时间:2015-05-01 12:06:48    阅读次数:163
5. Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2015-04-30 06:19:30    阅读次数:117
[LeetCode] 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, and there exists one unique longes...
分类:其他好文   时间:2015-04-29 01:54:46    阅读次数:113
53-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,...
分类:其他好文   时间:2015-04-28 11:34:29    阅读次数:102
leetcode || 124、Binary Tree Maximum Path Sum
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, 1 / 2 3 ...
分类:其他好文   时间:2015-04-27 13:20:29    阅读次数:130
leetcode || 122、Best Time to Buy and Sell Stock II
problem: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as ...
分类:其他好文   时间:2015-04-27 11:22:20    阅读次数:123
leetcode || 123、Best Time to Buy and Sell Stock III
problem: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions...
分类:其他好文   时间:2015-04-27 11:18:37    阅读次数:134
Binary Tree Maximum Path Sum
https://leetcode.com/problems/binary-tree-maximum-path-sum/Given a binary tree, find the maximum path sum.The path may start and end at any node in th...
分类:其他好文   时间:2015-04-26 22:23:56    阅读次数:174
socket 连接关闭的TIME_WAIT状态的理由
MSL就是maximum segment lifetime(最大分节生命期),这是一个IP数据包能在互联网上生存的最长时间,超过这个时间将在网络中消失TIME_WAIT两点原因:1、TCP分节可能由于路由器异常而“迷途”,在迷途期间,TCP发送端可能因确认超时而重发这个分节,迷途的分节在路由器修复后...
分类:其他好文   时间:2015-04-26 21:13:50    阅读次数:146
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!