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 04_recursive_max.js with fix for alternative solution #262

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TrayHard
Copy link

@TrayHard TrayHard commented Jun 9, 2023

Current alternative solution works only for arrays of natural numbers and for empty arrays it returns 0 instead of null or Error. This commit fixes these problems.

Current alternative solution works only for arrays of natural numbers and for empty arrays it returns 0 instead of null or Error. This commit fixes these problems.
@egonSchiele
Copy link
Owner

I like the change to add Number.MIN_VALUE. Could you remove the other function? I agree isFirstRun would make sense in production code, but the aim for this repo is readability, and I'd prefer to leave the isFirstRun logic out for that.

@TrayHard
Copy link
Author

TrayHard commented Dec 5, 2023

@egonSchiele I guess it's done, could you check this out please? Or should I remove 2 other console.log's as well?

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

Successfully merging this pull request may close these issues.

2 participants