#=================================== # Tanzila Islam # Email: tanzilamohita@gmail.com # Language: Python 3 #=================================== class Solution: def rotate(self, matrix: List[List[int]]) -> None: """ Do not return anything, modify matrix in-place instead. """ n = len(matrix) for row in range(n): for col in range(row+1, n): matrix[row][col], matrix[col][row] = matrix[col][row], matrix[row][col] for row in range(n): matrix[row].reverse()
Sunday, 16 October 2022
Array - 48. Rotate Image
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment