class Solution { public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &price) { int re = 0; if(p ...
分类:
其他好文 时间:
2017-03-08 22:59:21
阅读次数:
187
class Solution {public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { // write your co ...
分类:
其他好文 时间:
2017-03-08 21:20:39
阅读次数:
141
class Solution {public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { // write your co ...
分类:
其他好文 时间:
2017-03-08 20:16:35
阅读次数:
116
class Solution {public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { // write your co ...
分类:
其他好文 时间:
2017-03-08 19:28:57
阅读次数:
165
class Solution {public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { // write your co ...
分类:
其他好文 时间:
2017-03-08 18:58:10
阅读次数:
126
class Solution {public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { // write your co ...
分类:
其他好文 时间:
2017-03-08 00:20:16
阅读次数:
134
[POJ3693]Maximum repetition substring 试题描述 The repetition number of a string is defined as the maximum number R such that the string can be partitione ...
分类:
其他好文 时间:
2017-03-07 13:23:23
阅读次数:
222
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 ...
分类:
其他好文 时间:
2017-03-07 12:54:25
阅读次数:
115
Given a binary array, find the maximum number of consecutive 1s in this array if you can flip at most one 0. Example 1: Note: The input array will onl ...
分类:
其他好文 时间:
2017-03-07 08:46:32
阅读次数:
260
假设有一个数组,它的第i个元素是一支给定的股票在第i天的价格。如果你最多只允许完成一次交易(例如,一次买卖股票),设计一个算法来找出最大利润。 给出一个数组样例 [3,2,3,1,2], class Solution { public: /** * @param prices: Given an i ...
分类:
其他好文 时间:
2017-03-06 22:05:56
阅读次数:
131