Given a grid of size m x n, assign colors to each cell such that no two adjacent cells have the same color. The grid is represented as a 2D array of integers, where each integer corresponds to a cell. Your task is to determine the number of possible configurations.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak