You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise) in-place. You have to rotate the image in-place, which means you have to modify the input 2D matrix ...
Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become: [4,5,6,7,0,1,2] if it was rotated 4 times. [0,1,2,4 ...