" Do not use any imports, any dictionaries, or dictionary methods. Do not use try-except statements"
import csvfrom typing import TextIO
def rotate_map(m: list[list[int]], direction: str) -> list[list[int]]:"""Given a 2D representation of an elevation map , rotate the map eitherto the right or to the left, depending on the . A rotation willbe 90 degrees in the direction specified.Do not modify the original map.For example:>>> rotate_map([[1, 2], [3, 4]], 'left')[[2, 4], [1, 3]]"""if direction == 'left':write a functionelif direction == 'right':write a functionreturn m
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here