MCPcopy Create free account
hub / github.com/atcoder/ac-library / suffix_array

Function suffix_array

atcoder/string.hpp:177–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175} // namespace internal
176
177std::vector<int> suffix_array(const std::vector<int>& s, int upper) {
178 assert(0 <= upper);
179 for (int d : s) {
180 assert(0 <= d && d <= upper);
181 }
182 auto sa = internal::sa_is(s, upper);
183 return sa;
184}
185
186template <class T> std::vector<int> suffix_array(const std::vector<T>& s) {
187 int n = int(s.size());

Callers 3

mainFunction · 0.85
mainFunction · 0.85
TESTFunction · 0.85

Calls 2

sa_isFunction · 0.85
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68