Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update knuth-morris-pratt using ES6 #213

Open
amansaurabh opened this issue Oct 12, 2023 · 1 comment
Open

Update knuth-morris-pratt using ES6 #213

amansaurabh opened this issue Oct 12, 2023 · 1 comment

Comments

@amansaurabh
Copy link

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.

@amansaurabh amansaurabh changed the title Upadate knuth-morris-pratt using ES6 Update knuth-morris-pratt using ES6 Oct 12, 2023
@0himanshu3
Copy link

@amansaurabh please assign the issue to me.I have written the code in es6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants