codeeval.com Shortest Repetition commit. added test cases for future optimizations