← Questions

One round of candy crush on a grid

0
UberCodingLast asked Sep 2025

An integer matrix holds coloured blocks; equal numbers are the same colour and 0 is empty. Run one round: find every block that is part of a group to crush (clarify the rule; the reports describe runs of at least three same-coloured blocks), clear them all at once, then let the remaining blocks fall down. Return the matrix after the round.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding