Skip to content

Improved Memoize function #912

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

Merged
merged 5 commits into from
Mar 2, 2022
Merged

Improved Memoize function #912

merged 5 commits into from
Mar 2, 2022

Conversation

fahimfaisaal
Copy link
Contributor

@fahimfaisaal fahimfaisaal commented Mar 2, 2022

Describe your change:

  • Improved memoize function using Map & JSON.stringify
  • Used Map for better syntax.
  • Added jsonReplacer function for converting Map & Set
  • Added new test case
  • Removed code repetation.

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new JavaScript files are placed inside an existing directory.

@fahimfaisaal fahimfaisaal changed the title Upgrade memoize Improved Memoize function Mar 2, 2022
@raklaptudirm raklaptudirm added algorithm Adds or improves an algorithm feature Adds a new feature Reviewed labels Mar 2, 2022
@raklaptudirm raklaptudirm merged commit 6656ece into TheAlgorithms:master Mar 2, 2022
@fahimfaisaal fahimfaisaal deleted the upgrade-memoize branch March 29, 2022 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algorithm Adds or improves an algorithm feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants