[Solved] Most frequent substring of fixed length – simple solution needed [closed]
[ad_1] A simple solution is by trying all possible substrings from left to right (i.e. starting from indices i=0 to n-k), and comparing each to the next substrings (i.e. starting from indices j=i+1 to n-k). For every i-substring, you count the number of occurrences, and keep a trace of the most frequentso far. As a … Read more