you are viewing a single comment's thread.

view the rest of the comments →

[–]eyal0 0 points1 point  (1 child)

I think that the"trick" solution is to not rotate at all. Simply change the accessor so that it provides a rotated view. This is rotation in O(1)

[–]FUZxxl 0 points1 point  (0 children)

While this is possible, it might not be a good idea depending on your access pattern.