NeetCode #25LC-723MediumArrays & HashingNC Algo100
← Back to All Problems#25 · #723 · Candy Crush(粉碎糖果)
📌 Problem Statement & Constraints
Implement Candy Crush on an
m x n board of integers (1-3 for candy types, 0 for empty). Repeatedly: (1) mark all candies that are part of a horizontal or vertical run of 3 or more identical values, (2) set all marked cells to 0, (3) let the candies above fall down, preserving their order. Repeat until no more candies can be crushed, then return the board. Constraints: 3 <= m, n <= 50.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!