Many may know the problem of Lexicographically minimal string rotation
. Solutions are here like: How to find the number of the lexicographically minimal string rotation?
But I am not asking for a duplicate solution. Instead, I want to ask in another related question: is it the same as the problem of finding the lexicographical min suffix
?
For example, we have string bbaaccaadd
.
The lexicographically min string rotation would be "aaccaaddbb".
To find it, can I just find the minimal suffix of bbaaccaadd
, which is aaccaadd
and append the head 2 "bb" at the end?
Are these two problems identical?