Hello! Lately I’ve been focusing on increasing my knowledge of algorithms and code testing. In this post, I’ll showcase a code snippet where I implement a paint bucket algorithm. I slowed down the algorithm so that it is clear how the algorithm works.

I’m using JavaScript and React to implement the algorithm. The code isn’t perfect by any means, but the purpose is to showcase an interesting algorithm instead of having 100% code quality, so please don’t tear it apart. Here is the live example:

See the Pen Paint Bucket Algorithm In Slow Motion by Alexander Cannon (@Alex_Cannon) on CodePen.