Skip to content

Small golang project to get frequency counts of characters within a sample string and (hopefully) reveal the secret word.

License

Notifications You must be signed in to change notification settings

jkaplon/str-freq-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

str-freq-sort

One-off golang project to solve a coding challenge:

  • Take the sample string posted on a web page
  • Get frequency counts of characters
  • Order characters by frequency
  • And (hopefully) reveal the secret word

I chose golang for the project with the hopes of learning more about concurrency with goroutines and channels. That didn't work out. Instead, I ended up getting experience with golang's interfaces, and a couple new packages:

This repo also contains some basic unit tests that can be run with go test.

My results are published on my Docker Hub account. Give it a pull with docker pull jkaplon/str-freq-sort. Give it a try with docker run --rm --name str-freq-sort jkaplon/str-freq-sort.

In the process, I built a hacky-but-useful development docker image with auto-reload for Go web apps. The development branch contains the alternate Dockerfile with the auto-reload setup.

About

Small golang project to get frequency counts of characters within a sample string and (hopefully) reveal the secret word.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages