Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
6-liner: easy solution in Clear category for Network Attack by przemyslaw.daniel
def capture(data):
size, result = len(data), [0]+[99]*(len(data)-1)
for i in list(range(1, size))*size:
neighbors = [result[j] for j in range(size) if data[i][j]]
result[i] = data[i][i] + min(neighbors)
return max(result)
Dec. 21, 2017
Comments: