July 29, 2015, 12:29 a.m. by Rosalind Team
Given a string Text, its k-mer composition Compositionk(Text) is the collection of all k-mer substrings of Text (including repeated k-mers). For example,
Note that we have listed k-mers in lexicographic order (i.e., how they would appear in a dictionary) rather than in the order of their appearance in TATGGGGTGC. We have done this because the correct ordering of the reads is unknown when they are generated.
Generate the k-mer composition of a string.
Given: An integer k and a string Text.
Return: Compositionk(Text) (the k-mers can be provided in any order).
5 CAATCCAAC
AATCC ATCCA CAATC CCAAC TCCAA