Viraj0112's picture
Upload folder using huggingface_hub
03a907a verified
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]