From d0a110af776447285f9ca6ed822efc7f3eca7a47 Mon Sep 17 00:00:00 2001 From: sarvesh4396 <68162479+sarvesh4396@users.noreply.github.com> Date: Sun, 3 Oct 2021 00:12:56 +0530 Subject: [PATCH 1/4] fixed: spelling nonegative -> non-negative --- sorts/bead_sort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/bead_sort.py b/sorts/bead_sort.py index 3767e842d8c2..26a3fabc4807 100644 --- a/sorts/bead_sort.py +++ b/sorts/bead_sort.py @@ -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 """ From 9caf35e08dad6cce7b36800243b55252d5f9b4b9 Mon Sep 17 00:00:00 2001 From: sarvesh4396 <68162479+sarvesh4396@users.noreply.github.com> Date: Sun, 3 Oct 2021 00:13:47 +0530 Subject: [PATCH 2/4] fixed: spelling transpostiion -> transposition --- sorts/odd_even_transposition_single_threaded.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/odd_even_transposition_single_threaded.py b/sorts/odd_even_transposition_single_threaded.py index fe06459e8dd1..f6cf7fba2a71 100644 --- a/sorts/odd_even_transposition_single_threaded.py +++ b/sorts/odd_even_transposition_single_threaded.py @@ -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. From 9bb47d46a3daeeda564eabcf61022f7e3e40d2b6 Mon Sep 17 00:00:00 2001 From: sarvesh4396 <68162479+sarvesh4396@users.noreply.github.com> Date: Sun, 3 Oct 2021 00:14:14 +0530 Subject: [PATCH 3/4] fixed: spelling topolical -> topological --- sorts/topological_sort.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorts/topological_sort.py b/sorts/topological_sort.py index e7a52f7c7714..59a0c8571b53 100644 --- a/sorts/topological_sort.py +++ b/sorts/topological_sort.py @@ -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) From df07b8b8848b69608fba4d8a3148ff4c22c7eb80 Mon Sep 17 00:00:00 2001 From: sarvesh4396 <68162479+sarvesh4396@users.noreply.github.com> Date: Sun, 3 Oct 2021 00:15:02 +0530 Subject: [PATCH 4/4] fixed: spelling sufix -> suffix --- strings/prefix_function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strings/prefix_function.py b/strings/prefix_function.py index 9e6dbbf5408f..6eca01635fe3 100644 --- a/strings/prefix_function.py +++ b/strings/prefix_function.py @@ -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 @@ -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