Skip to content

Python

Thoughts on CodeCrafters

CodeCrafters is a site where one can complete a number of programming challenges. Challenges include:

  • Build your own HTTP server
  • Build your own Interpreter
  • Build your own Shell
  • Build your own Claude Code (still in beta)

Each challenge is broken into a number of steps, with an extensive test suite triggered by the command codecrafters submit which:

A flip puzzle

Top Spin was a puzzle in which 20 beads were placed on an oval track with a turntable, such that any four consecutive beads could be flipped. Naturally, I wondered whether it was possible to reverse the order of the beads, from [0, 1, ..., 19] to [19, 18, ..., 0].

As it turns out, this is possible even if the beads are placed on a straight track instead of an oval one.