kgw7401 / Algorithm

알고리즘 팀노트

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Algorithm

알고리즘 팀노트

2차원 리스트 90도 회전

def rotate_matrix_90(matrix):
  row = len(matrix)
  col = len(matrix[0])
  result = [[0]*row for _ in range(col)]
  for i in range(row):
    for j in range(col):
      result[j][row-i-1] = a[i][j]
  return result

About

알고리즘 팀노트