Skip to content

Instantly share code, notes, and snippets.

@sheldonrobinson
Created October 3, 2019 22:20
Show Gist options
  • Save sheldonrobinson/ba45f4df9f3304ee7ed1d4f763d5b118 to your computer and use it in GitHub Desktop.
Save sheldonrobinson/ba45f4df9f3304ee7ed1d4f763d5b118 to your computer and use it in GitHub Desktop.
CodeSignal Solution: rotateImage
def rotateImage(a):
w = len(a)
h = w
img =[0]*h
for col in range(h):
img_row = [0]*w
for row in range(w):
img_row[h-row-1] = a[row][col]
img[col] = img_row
return img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment