美文网首页
[LeetCode] Best Time to buy and

[LeetCode] Best Time to buy and

作者: 阳丶小光 | 来源:发表于2019-06-20 14:55 被阅读0次
    state transition
    unhold[i] = max(unhold[i - 1], cooldown[i - 1]); 
    hold[i] = max(hold[i - 1], unhold[i - 1] - prices[i]); 
    cooldown[i] = hol[i - 1] + prices[i];
    

    相关文章

      网友评论

          本文标题:[LeetCode] Best Time to buy and

          本文链接:https://www.haomeiwen.com/subject/ivtjqctx.html