This ensures that animations, inputs, and layout renders remain buttery smooth while the background thread crunches millions of permutations.
Algorithmic Optimizations: Bitwise Operations & Tries
To keep execution times under 100ms, raw JavaScript array manipulations weren't going to cut it. I had to optimize the algorithmic data structures:
Block Blast Solver: Instead of using 2D arrays to represent the board state, I utilized bitwise representations (integers as bitboards). Checking if a block fits or clearing a completed row becomes a lightning-fast bitwise AND (&) and OR (|) operation.
Nonograms: I implemented a constraint satisfaction solver that applies line-solving heuristics (like intersections and spacing checks) to pre-fill cells before falling back to depth-first search (DFS). This reduces the search space exponentially.






