Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a Go program to count the frequency of words in a string using a map.

Medium

Problem Statement

Create a Go program to count the frequency of words in a string using a map.

Sample Input

A string (e.g., "Go is fun and Go is fast").

Sample Output

Word Frequencies: map[Go:2 is:2 fun:1 and:1 fast:1]

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
package main import "fmt" func main() { // Count word frequencies in a string }
Log in or sign up to run or submit your code.Log inSign up
Input
A string (e.g., "Go is fun and Go is fast").
Expected Output
Word Frequencies: map[Go:2 is:2 fun:1 and:1 fast:1]