
Implement a 2D match-3 eliminator: Given an m×n grid of integers, repeatedly remove any cells that belong to a horizontal or vertical run of length ≥ 3 of the same value, apply gravity so cells fall downward within each column to fill gaps, fill emptied cells with zeros (or leave them empty, specify your choice), and repeat until the board stabilizes. Return the final board and analyze time and space complexity.