码迷,mamicode.com
首页 >  
搜索关键字:maximum subsequence    ( 5146个结果)
【LeetCode从零单排】No104 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.代码/** * Definition for binary tree * p...
分类:其他好文   时间:2015-03-04 17:08:21    阅读次数:118
Best Time to Buy and Sell Stock III
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-03-04 17:04:16    阅读次数:157
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-03-04 09:44:51    阅读次数:122
HackerRank - The Maximum Subarray
Point: not necessarily contigous max sub array, at least one element should be selected:def maxSubarrCont(arr, n): ret = arr[0] curr = arr[0] ...
分类:其他好文   时间:2015-03-03 16:34:35    阅读次数:127
45. Jump Game II Leetcode Python
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position.  Your goal is t...
分类:编程语言   时间:2015-03-03 09:59:06    阅读次数:165
55. Jump Game Leetcode Python
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position.  Determine ...
分类:编程语言   时间:2015-03-03 09:58:55    阅读次数:134
Maximum repetition substring 后缀数组
Maximum repetition substringTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7578Accepted: 2281DescriptionThe repetition number of a string is...
分类:编程语言   时间:2015-03-03 06:18:08    阅读次数:327
POJ 2533 Longest Ordered Subsequence (LIS)
Longest Ordered Subsequence Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 35930   Accepted: 15779 Description A numeric sequence of ai is ordered if a1...
分类:其他好文   时间:2015-03-02 21:01:07    阅读次数:189
leetcode 104.Maximum Depth of Binary Tree
leetcode 104.Maximum Depth of Binary Tree
分类:其他好文   时间:2015-03-02 18:31:30    阅读次数:114
leetcode 【 Best Time to Buy and Sell Stock III 】python 实现
题目:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complet...
分类:编程语言   时间:2015-03-02 00:55:58    阅读次数:237
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!