Rotator
Statement
Given a [[<<2D array>>]] of characters, and a [[<<rotation>>]] degree.
Need to do the proper rotation and print it back
Input description
<<line 1>>: two integers separated by space for he 2D Array dimensions ([[x]] & [[y]])
<<next x lines>>: one string per line for the array row values
<<next line>>: One integer for the rotation [[degree]]
Output description
The Array after rotation.
Constraints
Array character values are of set [ '.' , '|' , '-' , '<' , '^' , '>' , 'v' , '\' , '/' ]
Degree is multiplies of 90 in both directions (clock wise or counter clock wise)
Game modes
Fastest, Shortest, Reverse
Test cases
Test 1 Test
Input
1
1
>
180
Output
<
Validator 1 Validator
Input
1
1
.
180
Output
.
Test 2 Test
Input
1
2
->
90
Output
|
v
Validator 2 Validator
Input
1
2
->
-90
Output
^
|
Test 3 Test
Input
3
3
---
|>|
---
90
Output
|-|
|v|
|-|
Validator 3 Validator
Input
3
3
---
|>|
---
180
Output
---
|<|
---
Test 4 Test
Input
3
5
-/-\-
<--->
-\-/-
90
Output
|^|
/|\
|||
\|/
|v|
Validator 4 Validator
Input
4
5
-/-\-
<-|->
<-|->
-\-/-
180
Output
-/-\-
<-|->
<-|->
-\-/-
Solution language
Solution
Stub generator input