Skip to content

Kids Blocks

Puzzle: Kids Blocks

Author: @MNada

Published Difficulty: Medium

Algorithm X Complexity: A Perfect Exam Exercise


Overview

We were all little architects once — stacking blocks into wobbly towers, knocking them down with laughter, and building them up again. In those moments, we weren’t just making castles; we were discovering creativity, curiosity, and the joy of endless possibilities.

This puzzle offers another chance to build — this time with Algorithm X. The matrix setup isn’t difficult, but you’ll need more than the basics to avoid timing out on the tougher test cases. With thoughtful optimization, every test and validator can be solved in under about 5% of the time limit (Python).

It’s also a good reminder that Algorithm X isn’t always the entire solution. Sometimes, it’s just one elegant piece of a larger design — even for puzzles of only moderate difficulty.