MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / suffix_array

Function suffix_array

Strings/Suffix Array.cpp:80–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 return SA;
79}
80vector<int> suffix_array(const string &s, const int LIM = 128) {
81 vector<int> vec(s.size() + 1);
82 copy(begin(s), end(s), begin(vec));
83 vec.back() = '!';
84 auto ret = SA_IS(vec, LIM);
85 ret.erase(ret.begin());
86 return ret;
87}
88struct SuffixArray {
89 int n;
90 string s;

Callers 1

SuffixArrayMethod · 0.85

Calls 4

copyFunction · 0.85
SA_ISFunction · 0.85
sizeMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected