Skip to content

Commit d58a69b

Browse files
authored
Correct typo in bridge-searching-online.md
1 parent 527cce5 commit d58a69b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/graph/bridge-searching-online.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ We will now consistently disassemble every operation that we need to learn to im
108108
After finding the cycle we compress all vertices of the detected cycle into one vertex.
109109
This means that we already have a complexity proportional to the cycle length, which means that we also can use any LCA algorithm proportional to the length, and don't have to use any fast one.
110110

111-
Since all information about the structure of the tree is available is the ancestor array `par[]`, the only reasonable LCA algorithm is the following:
111+
Since all information about the structure of the tree is available in the ancestor array `par[]`, the only reasonable LCA algorithm is the following:
112112
mark the vertices $a$ and $b$ as visited, then we go to their ancestors `par[a]` and `par[b]` and mark them, then advance to their ancestors and so on, until we reach an already marked vertex.
113113
This vertex is the LCA that we are looking for, and we can find the vertices on the cycle by traversing the path from $a$ and $b$ to the LCA again.
114114

0 commit comments

Comments
 (0)