MCPcopy
hub / github.com/HuberTRoy/leetCode / helper

Method helper

Array/MaxAreaOfIsland.py:52–67  ·  view source on GitHub ↗
(x, y, result=0)

Source from the content-addressed store, hash-verified

50 y_length = len(court)
51
52 def helper(x, y, result=0):
53 Xy = self.makeAroundXY(x, y)
54 for i in Xy:
55 try:
56 if i[0] < 0 or i[1] < 0:
57 continue
58
59 if court[i[1]][i[0]] == 1:
60 court[i[1]][i[0]] = 0
61 result += 1
62 t = helper(i[0], i[1], 0)
63 result += t
64 except IndexError:
65 continue
66 else:
67 return result
68
69
70 for y in range(y_length):

Callers

nothing calls this directly

Calls 2

makeAroundXYMethod · 0.95
helperFunction · 0.70

Tested by

no test coverage detected