The links between neighbours: the one from particles[i] to particles[i + 1] is links[i].
particles[i]
particles[i + 1]
links[i]