rotate a 2d array

🏠

Problem from the book 'Elements of Programming Interviews in Python'. It actually turns out there is a much smarter way of doing this.

See: matrix clockwise rotation