Back to problems

Candy Crush Grid Matching and Gravity

Algorithm · Roblox · Medium

Candy Grid Run Detection and Gravity Problem Overview You receive an m x n matrix containing non-negative integers. Each value greater than 0 denotes a candy category, whereas 0 indicates an unoccupied position. A valid match is a contiguous horizontal or vertical sequence of at least three equal, positive entries. Part 1: Locate Matching Sequences Problem Statement Report each horizontal and vertical sequence whose size is at least 3. The required ordering places vertical…

Checking your access…