Skip to content

Commit 9e80f66

Browse files
authored
fix: fix brute_force_next_permutation_with_reps snippets
1 parent 4d46a8e commit 9e80f66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

brute_force/brute_force_next_permutation_with_reps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// N = len of v
22
// O(N^(r - l + 1) * N)
33
bool next_permutations_with_reps(vector<int> &v, int l, int r) {
4-
assert(l < r && !v.empty());
4+
assert(l <= r && !v.empty());
55
if (all_of(v.begin(), v.end(), [&](int x) { return x == r; }))
66
return false;
77

0 commit comments

Comments
 (0)