Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
Fix the Spaces
Puzzle: Fix the Spaces
Author: @Rafarafa
Published Difficulty: Medium
Algorithm X Complexity: Straightforward
Overview
Two years passed between my original solution to this puzzle and my new approach using Algorithm X. Although my memory is not quite what it used to be, I clearly remember enjoying the challenge. Looking back at my old code, it’s obvious I put a lot of effort into logically narrowing down possibilities to reach a solution. With a bit of review, I believe I could once again understand what that code is doing.
Now, contrast that with the few minutes I just spent constructing an exact cover solution using Algorithm X. It looks like so many other solutions I have built before. The joy this time comes not from the grind, but from the speed — the satisfaction of quickly conquering a medium-difficulty puzzle with elegance. It feels like I’m playing 2-on-2 basketball, and my teammate (Algorithm X) is a 7-foot-3 giant who slams down every pass I throw!