且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

比较周期性数据的快速方法

更新时间: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.