Skip to content

SpookyMiso/Challenge-Rotate-Matrix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matrix Rotator

Write the rotate method of the MatrixRotator class that accepts one argument, direction.
rotate must set the object's matrix property with a new, rotated matrix.

Rotating a matrix clockwise will rotate every element to it's clockwise position.

example matrix rotation: original

a b c
d e f
g h i

rotated clockwise (CW)

g d a
h e b
i f c

rotated clockwise (CW) once more

i h g
f e d
c b a

Advanced

Once your tests pass, you can move on to the advanced branch.

merge advanced into your current master branch. Follow instructions in the README.

Install dependencies

npm i

Run tests

There are 2 tests, make the tests pass.

mocha -w

About

Rotate Matrix Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%