Re: Matrix Rotation in Python?
The 4 bytes long part of the question means that the exercise expects you to get it as a string of binary data, and that the size of the elements in the array of binary data is 4 bytes. Think of it like C.
I think your implementation is correct and it would be the most efficient in C, but, for what it's worth, you can do 90 degree shifts with a matrix transpose and a flip around the x and/or y axis. If you did that with numpy, you could fill random array sizes with random data, then compare the two implementations together. Bonus points if you figure out how to use a library called hypothesis with that to test it, but that's also known as massive overkill, even if it is a somewhat good hypothesis learning example.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector