Incorrect approach in editorial for calculation of minimum number of rotations


The part of finding the number of repetitions is wrong in the editorial and would give wrong case for the string “abcabcabc”. The solution doesn’t even use kmp to compute the repeating string and simply divides the string in 2 halves at each step and compares them . This won’t work for odd strings with sub-string repetition.