1. Create HashMap {word: value}
2. Insert every word to map with value 1, if it is already there increment its valu, by 1
3. Push map tuples to vector and sort by values, or push it to priority queue.
4. Extract ten highest keys.
Time complexity:
m - number of unique words
n - number of all words
O(n+mlog(m))