I have a dictionary of words and a stream of incoming characters. I need to create a map of words present in the stream along with their frequencies. How can I achieve this efficiently?
A dictionary where the key is the word encountered, and the value is a count of the number of times that word is encountered. I think your question has some hidden problem you did not explain. This is trivial.