Booth's algorithm for string rotation

I was trying to understand, https://en.wikipedia.org/wiki/Lexicographically_minimal_string_rotation.
Can someone explain the algorithm or suggest some good source for the same.

Thanks in advance…