Feb-09-2018, 06:02 AM
How can I find the most frequently occurring sub-string in a larger string?
For example if the string 'gactctcagc' is provided, the program will return 'ctc' as it occurs twice in the string (including overlap). 'ct' and 'tc' also occur twice, but the longest string gets priority. I want to be able to account for substrings from 2-6 characters.
For example if the string 'gactctcagc' is provided, the program will return 'ctc' as it occurs twice in the string (including overlap). 'ct' and 'tc' also occur twice, but the longest string gets priority. I want to be able to account for substrings from 2-6 characters.