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

Function helper

Array/FootballFans.py:61–77  ·  view source on GitHub ↗
(x, y, result=0)

Source from the content-addressed store, hash-verified

59 y_length = len(court)
60
61 def helper(x, y, result=0):
62 nonlocal court
63 Xy = makeAroundXY(x, y)
64 for i in Xy:
65 try:
66 if i[0] < 0 or i[1] < 0:
67 continue
68
69 if court[i[1]][i[0]] == 1:
70 court[i[1]][i[0]] = 0
71 result += 1
72 t = helper(i[0], i[1], 0)
73 result += t
74 except IndexError:
75 continue
76 else:
77 return result
78
79
80 for y in range(y_length):

Callers 13

helperMethod · 0.70
numIslandsMethod · 0.70
getFootballFansFunction · 0.70
helperMethod · 0.70
maxAreaOfIslandMethod · 0.70
helperMethod · 0.50
hasPathSumMethod · 0.50
helperMethod · 0.50
pathSumMethod · 0.50
helperMethod · 0.50
sumNumbersMethod · 0.50
helperMethod · 0.50

Calls 1

makeAroundXYFunction · 0.85

Tested by

no test coverage detected