Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Network Attack solution in Uncategorized category for Network Attack by capback250
def capture(data):
timer, closed = 0, set()
que = [(timer + data[i][i], i) for i, j in enumerate(data[0]) if j]
while len(closed) < len(data):
timer += 1
for node in que:
if node[0] == timer:
closed.add(node[1])
for i, j in enumerate(data[node[1]]):
if j and i not in closed:
que.append((timer + data[i][i], i))
return timer
Feb. 25, 2016