Skip to content

Commit 448cb5b

Browse files
author
Cameron Custer
committed
docs: fix wrong examples and time/space claims
1 parent 6dac0f2 commit 448cb5b

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

library/convolution/min_plus_convolution_convex_and_arbitrary.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! @param convex,arbitrary arrays where convex satisfies
33
//! convex[i+1]-convex[i] <= convex[i+2]-convex[i+1]
44
//! @returns array `res` where `res[k]` = the min of
5-
//! (a[i]+b[j]) for all pairs (i,j) where i+j==k
5+
//! (convex[j]+arbitrary[i]) over pairs with i+j==k
66
//! @time O((n + m) log (n + m))
77
//! @space O(n + m)
88
vi min_plus(const vi& convex, const vi& arbitrary) {

library/data_structures_[l,r)/bit.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
//! // sum = a[0] + a[1] + ... + a[r - 1]
66
//! });
77
//! int r = bit.walk2(sum);
8-
//! // Returns min r s.t. sum of [0,r] >= sum
9-
//! // Returns n if sum of [0,n-1] < sum
8+
//! // Returns min r s.t. sum of [0,r+1) >= sum
9+
//! // Returns n if sum of [0,n) < sum
1010
//! // Returns -1 if sum <= 0
1111
//! @endcode
1212
//! @time O(n + q log n)

library/graphs/min_vertex_cover.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
//! auto [mvc_l, mvc_r] = cover(g, r);
1010
//! // mvc_l[u] == 1 iff u in mvc
1111
//! @endcode
12-
//! @time O(n + q * log n)
13-
//! @space O(n * \alpha(n))
12+
//! @time O(n + m)
13+
//! @space O(n)
1414
pair<vi, vi> cover(const vector<vi>& g, vi& r) {
1515
int n = sz(g), t = 0;
1616
vi cl(n), cr(sz(r)), q(n);

library/math/num_distinct_subsequences.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22
//! returns the number of distinct subsequences
3-
//! of a, including the empty subsquence
3+
//! of a, including the empty subsequence
44
//! @time O(n log n)
55
//! @space O(n)
66
int num_subsequences(const vi& a, int mod) {

library/math/partitions.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const int mod = 998'244'353;
44
//! @code
55
//! auto p = partitions(n);
66
//! @endcode
7-
//! p[i] = number of partitions of i numbers
7+
//! p[i] = number of partitions of i
88
//! @time O(n sqrt n)
99
//! @space O(n)
1010
vector<ll> partitions(int n) {

library/strings/suffix_array/compare/compare_substrings.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
//! int cmp = saq.cmp_substrs(l1,r1,l2,r2);
88
//! @endcode
99
//! requires l1,l2 < n
10-
//! if cmp1<0 then s[l1,r1) < s[l2,r2)
11-
//! if cmp1=0 then s[l1,r1) = s[l2,r2)
12-
//! if cmp1>0 then s[l1,r1) > s[l2,r2)
10+
//! if cmp<0 then s[l1,r1) < s[l2,r2)
11+
//! if cmp=0 then s[l1,r1) = s[l2,r2)
12+
//! if cmp>0 then s[l1,r1) > s[l2,r2)
1313
//! @time O(1)
1414
//! @space O(1)
1515
int cmp_substrs(int l1, int r1, int l2, int r2) {

0 commit comments

Comments
 (0)