Solves the New York Times Spelling Bee.
Their dictionary is not the same as the one included so you may find missing words as well as extras.
$ go build *.go
$ ./beesolver --help
Usage: beesolver REQUIRED_LETTER OTHER_LETTERS
-dict string
Path to a custom dictionary
-help
Print the usage and exit
-words-output
Default on. When off, the solution's words are hidden (default true)
- Go 1.20 — though given how little language functionality is used it likely works on much earlier versions of Go.
This was an excuse to play around with Go. I come from a Java background and did this in Java first. Unsurprisingly, until I learn the language's idioms and conventions, this code feels quite Java-y.
Run all tests:
$ go test -v ./...