Skip to content

burtawicz/sock-pair-in-golang

Repository files navigation

Sock Pairing (in Golang)

CircleCI

❓ Why?

Something I've always been curious about is defining algorithms for everyday activities. A few years ago I read Algorithms to Live By - The Computer Science of Human Decisions by Brian Christian and Tom Griffiths. One of the examples they explore in the book is how a college student pairs socks at random. The random pairing approach bothered me, so I started to wonder:

  • How many ways are there to pair socks?
  • Is there an optimal way to pair socks?
  • Is the optimal way to pair obvious?

⚗️ Running the Tests

From the CLI, execute:

  • go test to run the tests
  • go test -bench=. to benchmark the strategies (include the -short tag to skip the long-running benchmarks)

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Languages