• + 0 comments

    It's easier to shift around the indices rather than the actual elements. My approach was to not alter the original matrix, but for each index figure out where it would end up, and print appropriately.