Frage im Vorstellungsgespräch bei J.P. Morgan

A python or java question to write code on counting words in a document for the programming exercise.