摘要: ##暴力 class Solution { //前缀和 public int minSubArrayLen(int s, int[] nums) { int n = nums.length; int res = n; //[i,j) int[] preSum = new int[n+1]; for( 阅读全文
posted @ 2020-11-10 21:20 浅滩浅 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 实际上就是c++中函数next_permutation的实现(包含重复元素) ##c++源码实现 网址:https://en.cppreference.com/w/cpp/algorithm/next_permutation template<class BidirIt> bool next_per 阅读全文
posted @ 2020-11-10 15:40 浅滩浅 阅读(167) 评论(0) 推荐(0) 编辑