vault backup: 2022-06-11 11:52:24

This commit is contained in:
Jet Hughes 2022-06-11 11:52:24 +12:00
parent 564697a745
commit c2de3b2c50

View File

@ -161,6 +161,8 @@ If could happen that the sequence of Union operations does not create a rank tha
### 3.4 UF 4
Change find so it implements path compression to "flatten" the chains. When we follow tht path to a nodes representative we "learn" the final result
path compression occurs during find when we the chain of links from an element to its representative with a direct link (and do the same along the chain)
```java
if (x != reps[x]) {
reps[x] = find(reps[x]);