#C14101. Word Frequency Counter
Word Frequency Counter
Word Frequency Counter
Given an input string s, count the frequency of each word contained in it. A word is defined as a contiguous sequence of alphanumeric characters. The counting should be case-insensitive and punctuation should be ignored. After processing the string, output each unique word with its corresponding frequency count, sorted in lexicographical (alphabetical) order.
For example, if the input is:
Hello, world! Hello.
Then the output should be:
hello 2 world 1
inputFormat
The input consists of a single string s provided via standard input. The string may contain letters, digits, spaces and punctuation.
outputFormat
Print the frequency count of each word in the input string. Each output line should contain a word followed by a space and its count. The words should be printed in lexicographical order (alphabetical order).
## sampleHello
hello 1
</p>