Leetcode 3071. Minimum Operations to Write the Letter Y on a Grid
Given an odd n x n grid with values 0–2, find the minimum number of single-cell changes needed so that all cells on the letter Y (the two diagonals to the center plus the central vertical down to the bottom) share one value and all other cells share a different value. This reduces to counting value frequencies among Y and non‑Y cells and choosing two distinct target values that maximize preserved cells.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.