Added O(n²) solution to Shortest Repetition