Skip to content

Commit ea9af5e

Browse files
authored
Merge pull request cp-algorithms#1303 from ShubhamPhapale/patch-2
Update disjoint_set_union.md
2 parents a4207b9 + 48d99f6 commit ea9af5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data_structures/disjoint_set_union.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ If we add an edge $(a, b)$ that connects two connected components into one, then
375375
376376
Let's derive a formula, which computes the parity issued to the leader of the set that will get attached to another set.
377377
Let $x$ be the parity of the path length from vertex $a$ up to its leader $A$, and $y$ as the parity of the path length from vertex $b$ up to its leader $B$, and $t$ the desired parity that we have to assign to $B$ after the merge.
378-
The path contains the of the three parts:
378+
The path consists of the three parts:
379379
from $B$ to $b$, from $b$ to $a$, which is connected by one edge and therefore has parity $1$, and from $a$ to $A$.
380380
Therefore we receive the formula ($\oplus$ denotes the XOR operation):
381381

0 commit comments

Comments
 (0)