Hi All,
Can someone share their ideas on how to do the following problem in O(n): http://www.geeksforgeeks.org/lexicographically-smallest-rotated-sequence-set-2/
I have found on wikipedia that it can be done in O(n). I am not able to understand the booth's algorithm given on wikipedia.
Can someone share their approach to solve this problem in O(n).
Thanks in advance