https://github.com/Ataago/Computer-Networks/blob/32e16829e5af1a8016174380d6f19793c11e6621/C%20Programs/DistanceVectorRouting.c#L17 Set this as `nodes[i].outgoing[j] = 1;` which should be the initial value of number of hops. https://github.com/Ataago/Computer-Networks/blob/32e16829e5af1a8016174380d6f19793c11e6621/C%20Programs/DistanceVectorRouting.c#L34 Here, every time a new path is chosen, increase the number of hops by 1 by doing `nodes[i].outgoing[j] += 1;`