Skip to content

Feat: Added Memoize Func #732

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 4 commits into from
Oct 5, 2021
Merged

Feat: Added Memoize Func #732

merged 4 commits into from
Oct 5, 2021

Conversation

DmnChzl
Copy link
Contributor

@DmnChzl DmnChzl commented Oct 4, 2021

Hello again 👋
I added the memo algorithm inside the cache folder (unit tests included)
If that's okay for you, can you add the hacktoberfest-accepted mention? 🙏

@DmnChzl DmnChzl requested a review from raklaptudirm as a code owner October 4, 2021 11:44
Cache/Memoize.js Outdated
*/
export const memoize = (func) => {
// eslint-disable-next-line no-console
console.log(`Creating cache for function '${func.name}'`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those console.log() are probably not crucial for the functionality, and don't look good when running tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While on the test subject. Where did you get the idea to name the directory __test__, when the rest is just test ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! You're right. I apply my own convention rather than yours... My apologize 🙏
I'm gonna fix it!

Copy link
Member

@raklaptudirm raklaptudirm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some comments explaining what the algorithm does and how.

@pomkarnath98 pomkarnath98 added the hacktoberfest Created during hacktoberfest label Oct 5, 2021
@pomkarnath98 pomkarnath98 merged commit 0af6c0c into TheAlgorithms:master Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Created during hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants