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

Method up

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

Source from the content-addressed store, hash-verified

95 # up
96 return up(x+1, y-1)
97 def up(x, y):
98
99 while 1:
100 if not current_value:
101 return maps
102 xy = makeXY(x, y)
103
104 if y > -1 and x > -1 and y < n and x < n:
105 if maps[y][x] == 0:
106 maps[y][x] = current_value.pop()
107 y, x = xy[0][1], xy[0][0]
108 else:
109 # right
110 return right(x+1, y+1)
111 else:
112 # right
113 return right(x+1, y+1)
114
115 return right(0, 0)

Callers

nothing calls this directly

Calls 1

popMethod · 0.45

Tested by

no test coverage detected