Perl Weekly Challenge 53: Rotate Matrix and Vowel Strings
These are some answers to the Week 53 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (March 29, 2020). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Task 1: Rotate Matrix
Write a script to rotate the following matrix by given 90/180/270 degrees clockwise.
[ 1, 2, 3 ]
[ 4, 5, 6 ]
[ 7, 8, 9 ]
For example, if you rotate by 90 degrees then expected result should be like below:
[ 7, 4, 1 ]
[ 8, 5, 2 ]
[ 9, 6, 3 ]