Skip to content

Commit 1a69c7b

Browse files
committed
Snail comments cleanup
1 parent 4229b2d commit 1a69c7b

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/snail/snail.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
// Problem: SnailSort is an algorithm that takes an array of equal-length sub-arrays, and then merges them into a single array in a clockwise spiral, starting from the upper-left hand corner.
2-
// Time complexity:
3-
const arrayMatrix = [
4-
[1, 2, 3, 4, 5],
5-
[6, 7, 8, 9, 10],
6-
[11, 12, 13, 14, 15],
7-
[16, 17, 18, 19, 20],
8-
[21, 22, 23, 24, 25],
9-
];
2+
// Time complexity:
103

11-
// const arrayMatrix = [
12-
// [1, 2, 3],
13-
// [6, 7, 8],
14-
// [11, 12, 13],
15-
// ];
164
const snail = (arrayMatrix) => {
175
const finalArray = [];
186
while (arrayMatrix.length > 0) {
@@ -42,4 +30,4 @@ const snail = (arrayMatrix) => {
4230
return finalArray;
4331
};
4432

45-
export default snail
33+
export default snail;

0 commit comments

Comments
 (0)