Skip to content

Latest commit

 

History

History

word-count

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Word Count

Given a phrase, count the occurrences of each word in that phrase.

For example for the input "olly olly in come free"

olly: 2
in: 1
come: 1
free: 1

Requirements

Install assignment dependencies:

$ yarn

Making the test suite pass

Execute the tests with:

$ yarn test

Source

This is a classic toy problem, but we were reminded of it by seeing it in the Go Tour.