I was asked to find the Kth most frequent word used in given paragraph.
If two different words have the same frequencey of occurence then sort then lexicographically.
A variant of the leetcode problem: https://leetcode.com/problems/kth-largest-element-in-an-array/submissions/