Write a program that, given a file f and a number N, finds N most frequently occurring different words in f. I will provide you a large input file (several MBytes) to run your program on. Your program should run fast. Report your answers either in alphabetical order or sorted in order of most-common-word to least-common-word (among the top N words). Arrange the output nicely in columns.
Please find for me the 500 most common words for the input file I provide you, sorted each of the two ways.