suffix_array.cpp
static vector<int> BuildSuffixArray(const string &text)
{
	vector<int> result;
	int n = (int)text.size();

	for (int i = 0; i < n; i++) {
		result.push_back(i);
	}

	sort(result.begin(), result.end(), SuffixCmp(text));

	return result;
}
// Build suffix array of the string text and
// return a vector result of the same length as the text
// such that the value result[i] is the index (0-based)
// in text where the i-th lexicographically smallest
// suffix of text starts.
Build suffix array of the string text and
return a vector result of the same length as the text
such that the value result[i] is the index (0-based)
in text where the i-th lexicographically smallest
suffix of text starts.
Build suffix array of the string text and return a vector result of the same length as the text such that the value result [ i ] is the index ( 0 - based ) in text where the i - th lexicographically smallest suffix of text starts .
static vector<int> BuildSuffixArray(const string &text)
{
	vector<int> result;
	int n = (int)text.size();
	for (int i = 0; i < n; i++) {
		result.push_back(i);
	}
	sort(result.begin(), result.end(), SuffixCmp(text));
	return result;
}
static vector < int > BuildSuffixArray ( const string & text ) { vector < int > result ; int n = ( int ) text . size ( ) ; for ( int i = 0 ; i < n ; i ++ ) { result . push_back ( i ) ; } sort ( result . begin ( ) , result . end ( ) , SuffixCmp ( text ) ) ; return result ; }
Build suffix array of the string text and
return a vector result of the same length as the text
such that the value result[i] is the index (0-based)
in text where the i-th lexicographically smallest
suffix of text starts.
Build suffix array of the string text and return a vector result of the same length as the text such that the value result [ i ] is the index ( 0 - based ) in text where the i - th lexicographically smallest suffix of text starts .