I have a string s and I want to search for the substring of length X that occurs most often in s. Overlapping substrings are allowed.
For example, if s=\"aoaoa\" and X=3
It should be O(n*m) where m is the average length of a string in the list. For very small values of m then the algorithm will approach O(n)