class Solution { public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector &prices) { // write your code h... ...
分类:
其他好文 时间:
2017-03-08 23:02:18
阅读次数:
142
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
public class Solution { /** * @param A: a array of integers * @return : return an integer */ public static int removeDuplicates(int[] nums) { int a = ...
分类:
编程语言 时间:
2017-03-08 22:55:03
阅读次数:
214
public class Solution { /** * @param A: a array of integers * @return : return an integer */ public int removeDuplicates(int[] nums) { // write your c ...
分类:
编程语言 时间:
2017-03-08 22:24:16
阅读次数:
169
if(prices.size()<2) return a; int lowest = prices[0]; for(int n=1;n<prices.size();n++) { int cur = prices[n]; a = max(a,a-lowest); lowest = min(lowest ...
分类:
其他好文 时间:
2017-03-08 21:34:34
阅读次数:
130
废话不多说,直入正题 首先function.php 可以看到此方法是用数组遍历的方式写入到/config/config.php 打开config.php看看 <?php return array( //系统配置 'site_theme' => 'default', //站点默认主题目录 'url_h ...
分类:
系统相关 时间:
2017-03-08 21:22:52
阅读次数:
1572
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
1、语法 arr.slice(begin,end); 2、说明 begin起始位置,选中元素不包括。若未填写,则从0开始。 end结束位置,包括最后一个。若未填写,则直到最后一个。 3、使用 返回结果为一个新数组,对原数组不做改变。 类数组slice方法的使用。 Array.prototype.sl ...
分类:
编程语言 时间:
2017-03-08 20:19:53
阅读次数:
213
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