This program finds the k most frequent words in a given text (Java)
The problem : Find the K most frequently occurring words in a given text/blob.
Constraint : The solution should run in O(n) worst case time complexity where n is the number of characters in the text/blob.
Expected output : A list of K most frequently occurring words
Input : a. String representing the contents of the text/blob b. integer reprenting the K in the problem statement (K = K most occurring words in the text)