...

/

Charging Station: Finding Frequent Words by Sorting

Charging Station: Finding Frequent Words by Sorting

Understand how frequent k-mers can be found through sorting.

We'll cover the following...

Sorting k-mers

To see how sorting can help us find frequent k-mers, we’ll consider a motivating example when k = 2. Given a string Text = AAGCAAAGGTGGG, list all its 2-mers in the order they appear in Text, and convert each 2-mer into an integer using PatternToNumber to produce an array Index, as shown below:

...