Skip to content

Fix word typos in comments #4928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sorts/bead_sort.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Bead sort only works for sequences of nonegative integers.
Bead sort only works for sequences of non-negative integers.
https://en.wikipedia.org/wiki/Bead_sort
"""

Expand Down
2 changes: 1 addition & 1 deletion sorts/odd_even_transposition_single_threaded.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Source: https://en.wikipedia.org/wiki/Odd%E2%80%93even_sort

This is a non-parallelized implementation of odd-even transpostiion sort.
This is a non-parallelized implementation of odd-even transposition sort.

Normally the swaps in each set happen simultaneously, without that the algorithm
is no better than bubble sort.
Expand Down
2 changes: 1 addition & 1 deletion sorts/topological_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def topological_sort(start, visited, sort):
"""Perform topolical sort on a directed acyclic graph."""
"""Perform topological sort on a directed acyclic graph."""
current = start
# add current to visited
visited.append(current)
Expand Down
4 changes: 2 additions & 2 deletions strings/prefix_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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
Expand Down Expand Up @@ -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
Expand Down