Amazon | Phone | Kth most frequent word

Position: SDE in ML

Was asked the 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/

Comments (4)