Answer to Question #45830 in Other Programming & Computer Science for Jaydaa

2014-09-09T06:04:04-0400

Question #45830

what is the best data structure to solve this problem ? ( I will use Scala )

Your job is to read an arbitrary number of words from the standard input and keep track how many times each word occurs in the input. After the end of the input is reached, print how many times each unique word has occurred (in no particular word order or numerical order