Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FEATURE REQUEST] <title> #6739

Open
Open
@ragavi-632007

Description

What would you like to Propose?

Issue Title:

Add KMP (Knuth–Morris–Pratt) String Matching Algorithm Implementation
Description:

I would like to request the addition of the KMP string matching algorithm to this repository.
This algorithm efficiently finds occurrences of a pattern within a text using preprocessing of the pattern to avoid redundant comparisons.

Why this is useful:

KMP runs in O(n + m) time, making it much faster than the naïve string matching algorithm.

It’s a classic example of efficient pattern searching, useful in various applications like text editors, DNA sequence matching, and plagiarism detection.

Adds educational and algorithmic value to the repository.

Proposed Implementation:
Implement the kmp_search(text, pattern) function in Python/Java/C++ (depending on project language) that:

Builds the LPS (Longest Prefix Suffix) array for the pattern.

Uses it to efficiently search for the pattern in the text.

Issue details

Why this is useful:

KMP runs in O(n + m) time, making it much faster than the naïve string matching algorithm.

It’s a classic example of efficient pattern searching, useful in various applications like text editors, DNA sequence matching, and plagiarism detection.

Adds educational and algorithmic value to the repository.

Proposed Implementation:
Implement the kmp_search(text, pattern) function in Python/Java/C++ (depending on project language) that:

Builds the LPS (Longest Prefix Suffix) array for the pattern.

Uses it to efficiently search for the pattern in the text.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /