← ALL NOTES
Array

59. Spiral Matrix II

This is Spiral Matrix (#54) run in reverse: instead of reading a matrix in spiral order, you write 1..n² in spiral order. Same four shrinking boundaries — left, right, top, bottom — and the same…

Loading…