Compare commits
No commits in common. "890bad0fdaba17e34a68ffc7f242343583306d99" and "2f32caf3011367aafb9dc88dcfc6e8b548a39d44" have entirely different histories.
890bad0fda
...
2f32caf301
@ -1,18 +0,0 @@
|
||||
def snail(array):
|
||||
result = []
|
||||
|
||||
while array:
|
||||
result += array.pop(0)
|
||||
|
||||
if array and array[0]:
|
||||
for row in array:
|
||||
result.append(row.pop())
|
||||
|
||||
if array:
|
||||
result += array.pop()[::-1]
|
||||
|
||||
if array and array[0]:
|
||||
for row in reversed(array):
|
||||
result.append(row.pop(0))
|
||||
|
||||
return result
|
||||
Loading…
x
Reference in New Issue
Block a user