We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d46a8e commit 9e80f66Copy full SHA for 9e80f66
brute_force/brute_force_next_permutation_with_reps.cpp
@@ -1,7 +1,7 @@
1
// N = len of v
2
// O(N^(r - l + 1) * N)
3
bool next_permutations_with_reps(vector<int> &v, int l, int r) {
4
- assert(l < r && !v.empty());
+ assert(l <= r && !v.empty());
5
if (all_of(v.begin(), v.end(), [&](int x) { return x == r; }))
6
return false;
7
0 commit comments