Skip to content

Commit 7524874

Browse files
committed
fix typo
1 parent 58f811a commit 7524874

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

library/strings/string_hash.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
//! https://codeforces.com/blog/entry/4898
33
//! https://codeforces.com/blog/entry/60442
44
//! https://codeforces.com/blog/entry/129538
5-
//! p = probability of collision ~= 1/((1e9+7)*(1e9+9))
6-
//! probability of collision over q comparisons ~=
7-
//! (1 - (1/p))^q ~= 1 - (1/p)^q
5+
//! probability of collision ~= 1/((1e9+7)*(1e9+9)) = 1/p
6+
//! probability of no collision over q comparisons ~=
7+
//! (1 - (1/p))^q ~= 1 - q/p
88
//! checking if n hashes are pairwise distinct is the same
9-
//! as doing q = (n choose 2) ~= n^2 comparisons
10-
//! - use random base to avoid getting hacked on codeforces
9+
//! as doing q = (n choose 2) ~= n^2 comparisons
10+
//! use random base to avoid getting hacked on codeforces
1111
//! @time O(n + q)
1212
//! @space O(n)
1313
using hsh = array<ll, 2>;

0 commit comments

Comments
 (0)