Count the frequency of each word in a paragraph manually.
Difficulty: Medium
Phase: 6 · Mixed Logical Challenges
XP Reward: 20 XP
Topics: Mixed Logical Challenges, Medium
Supported Languages: Python, JavaScript, C, C++, Java
Problem Description
Given a sentence, count the frequency of each unique word in order of first appearance, format 'word: count'. Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).
Constraints
- -10^9 <= N <= 10^9
Examples
Example 1
Input: apple orange apple banana orange apple
Output: apple: 3 orange: 2 banana: 1
Explanation: Sample execution for input apple orange apple banana orange apple