Dsa
Hashing
Warm-up
Word Frequency Counter
Write a program to read a paragraph and count the frequency of each word, ignoring case and punctuation.
Input Format:
- A single string paragraph.
Output Format:
- Print each word and its count in the format 'word: frequency'.
Example:
Input:
"Hello, hello world!"
Output:
"hello: 2\nworld: 1"
Key concepts
hashingstrings
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now