
算法基础
生如夏花65
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Sliding Window Problem--用简单数组解决滑动窗口问题
题目叙述:Input:第一行有两个数字 n 和 k。窗口大小为k。第二行输入一个数组,有 n 个整数。数据规模:0 < k < n <= 1,000,000Output:输出一共n-k+1 个数字,为窗口从左向右滑动过程中,窗口里连续k个数中的最大值。Example:数组为[4,3,5,4,3,3,6,7],窗口大小为3时:[4 3 5]4 3 3 6 74[...原创 2020-03-02 16:45:38 · 198 阅读 · 0 评论 -
最大堆/最大优先队列——算法题
课程作业的Online Judge有一道算法题:DescriptionThe mall is running a T-day promotion.·Every day, customers who shop at the mall can put their own receipts into a box to participate in the promotion.·Every day...原创 2020-02-27 20:58:38 · 364 阅读 · 0 评论