Rotate Square Matrix by 90 Degrees Counterclockwise
Given a n*n square matrix mat[][], rotate it by 90 degrees in counterclockwise direction without using any extra space. Examples: Input: mat[][] = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]Output: [[3, 6, 9], [2, 5, 8], [1, 4, 7]] Input: mat[][] = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16