MCPcopy Create free account
hub / github.com/danialgoodwin/dev / SpiralMatrix

Method SpiralMatrix

code-practice/code-fights/SpiralMatrix.java:18–43  ·  view source on GitHub ↗

Fill the square matrix of the given size n spirally clockwise from the upper left corner with numbers from 1 to n n. Example: For n = 3 the output should be [[1,2,3], [8,9,4], [7,6,5]] [input] integer n The matrix size, 1 ≤ n ≤ 50. [output] array.array.integer More info: https://codefights.com/c

(int n)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected