The authors address the problem of how to adapt an algorithm designed for fixed-topology networks to produce the intended results when it is run in a network with topology that changes dynamically during its execution. They present a simple and unified procedure, called a reset procedure, which, when combined with the static algorithm, achieves this adaptation. The communication and time complexities of the reset procedure, per topological change, are independent of the number of topological changes and are linearly bounded by the size of the subset of the network that participates in the algorithm.