Count single-colour squares in a character grid

0
Remix

Each cell of a grid holds a character standing for a colour. Count all square sub-grids whose cells all have the same colour, of every size. Use the DP where each cell stores the side of the largest uniform square ending there.

GoogleTechnical phone screenLast asked Nov 2025
No answer yet. Write the first one; the best answer gets endorsed.