File size: 257 Bytes
03a907a
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
from dataset.problem_10.helpers import transpose


def rotate_90_clockwise(matrix: list[list[int]]) -> list[list[int]]:
    """Rotate matrix 90 degrees clockwise."""
    t = transpose(matrix)
    # BUG: this is counter-clockwise.
    return t[::-1]