-
Notifications
You must be signed in to change notification settings - Fork 126
Added Knuth Morris Prat (KMP) #73
base: master
Are you sure you want to change the base?
Conversation
@anikamurarka Please set up your git config properly. Your email is not verified. Also the checks have failed. Please rectify them. |
Thanks @CuriousLearner, will make the required changes. |
@anikamurarka Few things:
|
Thanks @goelakash ... will update it soon |
@anikamurarka Please make the following changes. |
@goelakash please review !! |
@@ -10,5 +10,7 @@ | |||
from .linear_search import linear_search | |||
from .queue import queue | |||
from .counting_sort import counting_sort | |||
from .stack import Stack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this redundant import
@goelakash @rahulroxx please review !! |
def test_bubble_sort(): | ||
a = 'BBC ABCDAB ABCDABCDABDE' | ||
b = 'ABCDABD' | ||
assert kmp(a, b) == 15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't hard code this. Instead try kmp(a, b) == a.find(b)
@anikamurarka Once the changes are done, please squash the commits as well. |
@goelakash, I have made the changes, please review ! |
@anikamurarka You have made some error in rebasing the branch. As a result, you are re-commiting commits of other contributors (see your git log).
|
#12. |
We resolved all the errors in commit no. -> 578def2. @CuriousLearner |
|
||
def kmp(full_string, pattern): | ||
''' | ||
It takes two arguments, the main string and the patterb which is to be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
patterb -> pattern
It seems the proposer has deleted his/her Github account. |
Added implementation of Knuth Morris Prat (KMP) algorithm for string comparison.
--Team Code-ologists