acwing
共 172 篇文章
acwing1451. 单链表快速排序
暂无摘要...
leetcode150. 逆波兰表达式求值
暂无摘要...
leetcode121. 买卖股票的最佳时机
暂无摘要...
leetcode42. 接雨水
暂无摘要...
leetcode946. 验证栈序列
暂无摘要...
leetcode84. 柱状图中最大的矩形
分析对于一个高度,如果能得到向左和向右的边界那么就能对每个高度求一次面积遍历所有高度,即可得出最大面积使用单调栈,在出栈操作时得到前后边界并计算面积class Solution {public: int largestRectangleArea(vector<int>& h
acwing59. 螺旋矩阵 II
暂无摘要...
acwing56. 合并区间
class Solution {public: vector<vector<int>> merge(vector<vector<int>>& intervals) { vector<vector<
acwing125. 耍杂技的牛
暂无摘要...
acwing104. 货仓选址
分析中位数就是距离最近的点。#include<iostream>#include<algorithm>using namespace std;const int N=1e5+10;int a[N];int main(){ int n; cin>>n;