MCPcopy Create free account
hub / github.com/HuberTRoy/leetCode / right

Method right

Array/SpiralMatrixII.py:46–61  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

44 (x-1, y)]
45
46 def right(x, y):
47
48 while 1:
49 if not current_value:
50 return maps
51 xy = makeXY(x, y)
52 if (y > -1 and x > -1) and (y < n and x < n):
53 if maps[y][x] == 0:
54 maps[y][x] = current_value.pop()
55 y, x = xy[2][1], xy[2][0]
56 else:
57 # down
58 return down(x-1, y+1)
59 else:
60 # down
61 return down(x-1, y+1)
62
63 def down(x, y):
64

Callers

nothing calls this directly

Calls 1

popMethod · 0.45

Tested by

no test coverage detected