mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +08:00
Fix word typos in comments (#4928)
* fixed: spelling nonegative -> non-negative * fixed: spelling transpostiion -> transposition * fixed: spelling topolical -> topological * fixed: spelling sufix -> suffix
This commit is contained in:

committed by
GitHub

parent
d530d2bcf4
commit
90db98304e
@ -14,7 +14,7 @@ Time Complexity: O(n) - where n is the length of the string
|
||||
def prefix_function(input_string: str) -> list:
|
||||
"""
|
||||
For the given string this function computes value for each index(i),
|
||||
which represents the longest coincidence of prefix and sufix
|
||||
which represents the longest coincidence of prefix and suffix
|
||||
for given substring (input_str[0...i])
|
||||
|
||||
For the value of the first element the algorithm always returns 0
|
||||
@ -45,7 +45,7 @@ def prefix_function(input_string: str) -> list:
|
||||
def longest_prefix(input_str: str) -> int:
|
||||
"""
|
||||
Prefix-function use case
|
||||
Finding longest prefix which is sufix as well
|
||||
Finding longest prefix which is suffix as well
|
||||
|
||||
>>> longest_prefix("aabcdaabc")
|
||||
4
|
||||
|
Reference in New Issue
Block a user