滑动窗口

This commit is contained in:
2023-05-30 20:55:44 +08:00
parent 81da2f5b17
commit e23d7c213b
3 changed files with 45 additions and 0 deletions
+10
View File
@@ -115,4 +115,14 @@ private:
std::stack<int> _min_stk;
};
/**
* 剑指 Offer 59 - I. 滑动窗口的最大值
*
* @url https://leetcode.cn/leetbook/read/illustration-of-algorithm/58o46i/
* @param nums
* @param k
* @return
*/
std::vector<int> max_sliding_window(std::vector<int>& nums, int k);
}