Skip to content

Update knuth-morris-pratt using ES6 #213

Open
@amansaurabh

Description

@amansaurabh

Description:

Current Behavior:

The current implementation of the Knuth-Morris-Pratt (KMP) algorithm is written in a mix of ES5 and older JavaScript syntax. It consists of a function that efficiently searches for the position of the first occurrence of a specified value in a string.

Proposed Changes:

I propose updating the code to use ES6 features and syntax. This includes leveraging arrow functions, template literals, and other modern JavaScript constructs to enhance readability and maintainability.

Benefits:

  • Improved code readability and maintainability due to the use of modern JavaScript syntax.
  • Potential performance enhancements through optimized ES6 constructs.

Additional Information:

The updated code will maintain the functionality of the KMP algorithm while utilizing ES6 features to enhance its codebase. This update aims to align the algorithm with modern JavaScript practices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions