摘要:
901. 股票价格跨度 class StockSpanner { public: StockSpanner() { } int next(int price) { int d=1; while(!value.empty()&&price>=value.top())//价格栈不为空且当前的价格大于等于 阅读全文
posted @ 2020-06-13 22:07
branna
阅读(165)
评论(0)
推荐(0)
摘要:
面试题63. 股票的最大利润 class Solution { public: int maxProfit(vector<int>& prices) { if(prices.size()<=1) return 0; int ans=prices[0]; int ans1=0; for(int i=1 阅读全文
posted @ 2020-06-13 22:05
branna
阅读(152)
评论(0)
推荐(0)

浙公网安备 33010602011771号