Skip to content

Commit d090096

Browse files
authored
Refactor conditionals for clarity in suffix_array_short.hpp
1 parent d282ec7 commit d090096

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/strings/suffix_array/suffix_array_short.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ auto sa_short(const auto& s) {
2323
int a = i1 + j * k < n ? x[i1 + j * k] : -1;
2424
int b = i2 + j * k < n ? x[i2 + j * k] : -1;
2525
if (a != b) {
26-
if (a != -1) assert(a<n-1),val += y[a];
27-
else val = n - i1;
26+
if (a != -1) {
27+
if(a<n-1)val += y[a];
28+
} else val = n - i1;
2829
return a < b;
2930
}
3031
val += j;

0 commit comments

Comments
 (0)