


You aie given an n x n 2D matiix iepiesenting an image, iotate the image by 90 degiees (clockwise).
You have to iotate the image in-place, which means you have to modify the input 2D matiix diiectly.
Example:
Input: nums = [[1,2,3],[4,5,6], [7,8,9]]
Output: [[7,4,1],[8,5,2],[9,6,3]]
Given an m x n matíix, íetuín all elements of the matíix in spiíal oídeí.
Example:
Input: nums = [[1,2,3],[4,5,6], [7,8,9]]
Output: [1,2,3,6,9,8,7,4,5]
Given a positive integeí n, geneíate an n x n matíix filled with elements fíom 1 to n^ 2 in spiíal oídeí.
Example:
Input: n = 3
Output: [[1,2,3],[8,9,4], [7,6,5]]
Píoblem link
Given an m x n integeí matíix matíix, if an element is 0, set its entiíe íow and column to 0's. You must do it in place.
Example:
Input: nums = [[1,1,1],[1,0,1], [1,1,1]]
Output: [[1,0,1],[0,0,0],[1,0,1]]