Created
October 3, 2019 22:20
-
-
Save sheldonrobinson/ba45f4df9f3304ee7ed1d4f763d5b118 to your computer and use it in GitHub Desktop.
CodeSignal Solution: rotateImage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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