Question #2a:
The input is a text file with a list of words. One word per line.
You need to print the number of times that each word appears in the file.
Example:
Input file:
Question #2b:
Same question as #2a. However the size of the file is 300mb
The input is a text file with a list of words. One word per line.
You need to print the number of times that each word appears in the file.
Example:
Input file:
Output (note the the order is not important):this
is
a
simple
question
with
a
simple
answer
this: 1
is: 1
a: 2
simple: 2
...
Question #2b:
Same question as #2a. However the size of the file is 300mb