We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c70d5d8 commit d3942d8Copy full SHA for d3942d8
scripts/algorithms/S/Spiral Matrix II/Spiral Matrix II.js
@@ -1,3 +1,4 @@
1
+// Runtime: 51 ms (Top 99.51%) | Memory: 42.1 MB (Top 65.95%)
2
var generateMatrix = function(n) {
3
const arr = new Array(n).fill(0).map(() => new Array(n).fill(0));
4
let count = 1, index = 1, i = 0, j =0, changed = false, toIncrease = true;
@@ -35,4 +36,4 @@ var generateMatrix = function(n) {
35
36
changed = false;
37
}
38
return arr;
-};
39
+};
0 commit comments