更新时间:2023-02-16 11:33:19
有一种快速算法可以找到字符串的最小旋转 - https://en.wikipedia.org/wiki/Lexicographically_minimal_string_rotation.因此您可以存储和比较最小旋转.
There is a fast algorithm for finding the minimum rotation of a string - https://en.wikipedia.org/wiki/Lexicographically_minimal_string_rotation. So you can store and compare the minimum rotation.