TweakCode
Graphs lessons
Loading editor…
Test casesRun to compare output
Input
n = 4
Output
—
Expected
[["..Q.","Q...","...Q",".Q.."],[".Q..","...Q","Q...","..Q."]]

More practice

Same technique, different problems. Try them without the walkthrough.