Graph, Graph Algorithm.
After each superstep, tasks need to exchange what they have computed, in this case, the updated distances array. This synchronization phase happens and is completed before a new superstep commences, therefore, we need a barrier after each superstep. Supersteps are repeated until the graph is merged