What can be the time complexity of an algorithm that calculates the weights of the nodes in a graph?
for i in V:
    weight(i) = 0
for e=(i,j) in E:
    weight(i) = weight(i) + weight(e)
    weight(j) = weight(j) + weight(e)