单调栈 Posted on 2021-04-08 Views: 12345678for(int i=0;i<len;i++){ rightMin[i] = len; while(!que.empty()&&heights[que.top()]>heights[i]){ rightMin[que.top()] = i; que.pop(); } que.push(i); } Welcome to my other publishing channels GItHub