Implement top_k_words(words, k) returning the k most frequent words, most frequent first. Break ties alphabetically. Comparison is case-insensitive, so return words in lowercase.
Then implement top_k_heap(words, k) with the same output, using a heap of size k so it runs in O(n log k). (Hint: Python's heapq is a min-heap, so think about what to keep at the top.)