Compute the K Most Frequent Queries
You are given an array of strings. Computer the k strings that appear most frequently in the array.
- use hashmap to count the frequency of the strings.
- either use min heap of size k.
- or use quick select to find the k most frequent strings.