Given an input text string and an integer providing the number of items to return this algorithms returns a list of word strings ordered by word frequency, the most frequently occurring word first.
The algorithms runs in O(n) time where n is the number of characters in the input text string.
Assuming familiarity with maven, clone or download the master branch and issue the following command:
mvn clean install