8000 Implement prefix function, knuth-morris-pratt another usage by nikalosa · Pull Request #2099 · TheAlgorithms/Python · GitHub
[go: up one dir, main page]

Skip to content

Implement prefix function, knuth-morris-pratt another usage #2099

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 5 commits into from
Jun 17, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Update prefix_function.py
  • Loading branch information
cclauss authored Jun 17, 2020
commit c3c4957d8c39c036dd9dd87f5719d3af86c0a952
2 changes: 0 additions & 2 deletions strings/prefix_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
E.x. Finding longest prefix which is also suffix

Time Complexity: O(n) - where n is the length of the string

"""


Expand All @@ -24,7 +23,6 @@ def prefix_function(input_string: str) -> list:
[0, 1, 0, 0, 0, 1, 2, 3, 4]
>>> prefix_function("asdasdad")
[0, 0, 0, 1, 2, 3, 4, 0]

"""

# list for the result values
Expand Down
0