Skip to content

Commit ae9bf72

Browse files
authored
Merge pull request #50 from not522/fix_docs
Fix broken documents
2 parents 693b75a + 22c5091 commit ae9bf72

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

atcoder/string.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ def cmp(x: int, y: int) -> int:
3131

3232

3333
def _sa_is(s: typing.List[int], upper: int) -> typing.List[int]:
34-
'''
35-
SA-IS, linear-time suffix array construction
36-
Reference:
37-
G. Nong, S. Zhang, and W. H. Chan,
38-
Two Efficient Algorithms for Linear Time Suffix Array Construction
39-
'''
40-
4134
threshold_naive = 10
4235
threshold_doubling = 40
4336

@@ -165,6 +158,14 @@ def induce(lms: typing.List[int]) -> None:
165158

166159
def suffix_array(s: typing.Union[str, typing.List[int]],
167160
upper: typing.Optional[int] = None) -> typing.List[int]:
161+
'''
162+
SA-IS, linear-time suffix array construction
163+
164+
Reference:
165+
G. Nong, S. Zhang, and W. H. Chan,
166+
Two Efficient Algorithms for Linear Time Suffix Array Construction
167+
'''
168+
168169
if isinstance(s, str):
169170
return _sa_is([ord(c) for c in s], 255)
170171
elif upper is None:
@@ -193,6 +194,8 @@ def cmp(left: int, right: int) -> int:
193194
def lcp_array(s: typing.Union[str, typing.List[int]],
194195
sa: typing.List[int]) -> typing.List[int]:
195196
'''
197+
Longest-Common-Prefix computation
198+
196199
Reference:
197200
T. Kasai, G. Lee, H. Arimura, S. Arikawa, and K. Park,
198201
Linear-Time Longest-Common-Prefix Computation in Suffix Arrays and Its
@@ -228,6 +231,8 @@ def lcp_array(s: typing.Union[str, typing.List[int]],
228231

229232
def z_algorithm(s: typing.Union[str, typing.List[int]]) -> typing.List[int]:
230233
'''
234+
Z algorithm
235+
231236
Reference:
232237
D. Gusfield,
233238
Algorithms on Strings, Trees, and Sequences: Computer Science and

atcoder/twosat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
class TwoSAT:
77
'''
8+
2-SAT
9+
810
Reference:
911
B. Aspvall, M. Plass, and R. Tarjan,
1012
A Linear-Time Algorithm for Testing the Truth of Certain Quantified Boolean

0 commit comments

Comments
 (0)