Given string s, find the shortest string t, such that, t^m=s.
Examples:
s=\"aabbb\" => t=\"aabbb\" s=\"abab\" => t = \"ab\"
a modification to Boyer-Moore could possibly handle this in O(n) where n is length of s
http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm