@emdanowski/spiral-array-traversal
v1.0.8
Published
Print a given matrix in spiral form
Downloads
3
Maintainers
Readme
Spiral Array Traversal
Spiral Array Traversal is a simple JavaScript module created and maintained by Eric Danowski.
Installation
npm install @emdanowski/spiral-array-traversal
Usage
let { traverse } = require('@emdanowski/spiral-array-traversal');
let arr = [
["1", "2", "3"],
["4", "5", "6"],
["7", "8", "9"]
];
let result = traverse(arr);
/*
will return the following:
"1 2 3 6 9 8 7 4 5"
*/
License
Spiral Array Traversal is licensed under the MIT License.