← Questions
Fewest changes to draw the letter Y in a grid
0
I was asked this
No reports yet. Sign in to say where you were asked it.
An n x n grid (n odd) holds only the values 0, 1 and 2. The letter Y is made of the two diagonals running from the top corners down to the centre, plus the centre column from the centre to the bottom. Every Y cell must end up holding one value and every other cell a different value. Return the fewest cells you must change. Count the values inside and outside the Y once, then try each ordered pair of distinct values.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
