posts: union-find: fix typos
This commit is contained in:
parent
fa2849bdba
commit
eb2245db21
|
@ -94,7 +94,7 @@ def find(self, elem: int) -> int:
|
||||||
|
|
||||||
However, going back up the chain of parents each time we want to find the root
|
However, going back up the chain of parents each time we want to find the root
|
||||||
node (an `O(n)` operation) would make for disastrous performance. Instead we can
|
node (an `O(n)` operation) would make for disastrous performance. Instead we can
|
||||||
do a small optimization called _path splitting.
|
do a small optimization called _path splitting_.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def find(self, elem: int) -> int:
|
def find(self, elem: int) -> int:
|
||||||
|
|
Loading…
Reference in a new issue