-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Consolidate find_min and find_min recursive and find_max and find_max_recursive #8960
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
Consolidate find_min and find_min recursive and find_max and find_max_recursive #8960
Conversation
@tianyizheng02 What is your opinion of merging the recursive and iterative implementations into one file? Could also add benchmarks to compare the difference in time complexity between the implementations |
I support these kinds of file merges. Like you said, it helps with benchmarking, but it also just makes it much easier to compare different implementations in general Also helps with resolving #8098, of course |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that this file also contains the recursive implementation, we should probably rename the existing find_max
to find_max_iterative
to contrast it with the recursive one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find_min()
-> find_min_iterative()
(see previous comment)
…_recursive (TheAlgorithms#8960) * updating DIRECTORY.md * refactor(min-max): Consolidate implementations * updating DIRECTORY.md * refactor(min-max): Append _iterative to func name --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Describe your change:
Merges
find_min
andfind_min_recursive
into justfind_min
.Merges
find_min
andfind_max_recursive
into justfind_max
.Checklist: