You are given an n × n 2D matrix representing an image. Rotate the image 90 degrees clockwise.
Do the rotation in place — modify matrix directly without allocating another n × n grid — and return it.
[[1,2,3],[4,5,6],[7,8,9]][[1,2],[3,4]][[5]][[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]][[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]][[0,-1],[-2,-3]]