You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/6_Advanced/Offline_Del.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ $\mathcal{O}(N \log^2 N)$ runtime. You _must_ use merging by rank. An explanatio
26
26
27
27
### Implementation
28
28
29
-
Adding on to usual DSU, we can store the parent
29
+
Adding on to the usual DSU, we can store the parent
30
30
and sizes of nodes that are being merged before each merge. This allows us revert each node to their parents before the merge so that the rollback function can use the information to undo the merges.
31
31
32
32
We can store each state of the DSU using an integer, captured by the snapshot function which returns the number of old merges that has not been rolled back. It's similar taking a picture of something, and years later going back into your photo album and scrolling up until you find this picture.
0 commit comments