edualgo / eduAlgo

A simple python package having modules of different algorithms to use in educational purposes.
https://edualgo.github.io/documentation/
MIT License
98 stars 54 forks source link

Pattern Searching::Mismatch Observation - Implement KMP Algorithm #159

Closed Abhijit2505 closed 3 years ago

Abhijit2505 commented 3 years ago

Wikipedia Says,

In computer science, the Knuth–Morris–Pratt string-searching algorithm (or KMP algorithm) searches for occurrences of a "word" W within a main "text string" S by employing the observation that when a mismatch occurs, the word itself embodies sufficient information to determine where the next match could begin, thus bypassing re-examination of previously matched characters.

Read about the algorithm here.

Acceptance Condition

Audarya07 commented 3 years ago

Hey @Abhijit2505 I would like to add KMP pattern search algo in python to the edualgo/algorithms/ directory. Please assign the issue to me

Abhijit2505 commented 3 years ago

@Audarya07 please get started

Audarya07 commented 3 years ago

Hey @Abhijit2505 I have raised a PR. Please have a look and let me know if any changes are required from my end