Maximal suffix
Posted: Sun Aug 15, 2004 8:52 pm
Problem: given a text determine lexicographically maxiaml suffix of a string in O(n).
For example:
cacbca has the max suffix cbca.
I read that this can be done with technique similar to one used in KMP, using the maximal suffix and at the same time a prefix of a word, but I don't know how to implement it.
Any help is appreciated
For example:
cacbca has the max suffix cbca.
I read that this can be done with technique similar to one used in KMP, using the maximal suffix and at the same time a prefix of a word, but I don't know how to implement it.
Any help is appreciated