edualgo / eduAlgo

A simple python package having modules of different algorithms to use in educational purposes.

Home Page:https://edualgo.github.io/documentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pattern Searching::Mismatch Observation - Implement KMP Algorithm

Abhijit2505 opened this issue · comments

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

  • Code is written with proper mentions of edge cases
  • Well commented code
  • Well documentation(refer to codebase)

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

@Audarya07 please get started

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