A rotation moves some letters from the front of s to the back ("abcd" can become "cdab"). Return the smallest rotation in dictionary order.
For "bca" the answer is "abc"; for "cabcab" it is "abcabc".
Example 1
Input:
smallest_rotation('bca')
Output:
'abc'
Example 2
Input:
smallest_rotation('cabcab')
Output:
'abcabc'
0 <= len(s) <= 200000No results yet
Run your code to check it against the examples, or submit to run every test.