Pereira's (Pereira, 1985) algorithm also stores changes to nodes separate from the graph.
pereira's mechanism incurs a log(n) overhead for accessing the changes (where n is the number of nodes in a graph), resulting in an O(n log n) time algorithm.