Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.7k
feat: add MergeTwoSortedLinkedLIsts algorithms#1442
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
I'm participating in hacktoberfest. |
Uh oh!
There was an error while loading.Please reload this page.
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.
The class is unnecessary, this should be just the merge function.
(Note also that really, this "sorted merge" approach is more flexible: The proper abstraction is that of aniterator. This could then be aniterator merge taking two iterators and producing a merged one, which could be used to merge arrays, linked lists, doubly linked lists, whatever is iterable inorder and can be created inorder.)
change the function params and return value from Node to LinkedList.
Could you please label this pr as hacktoberfest? |
Describe your change:
Checklist:
Example:
UserProfile.js
is allowed butuserprofile.js
,Userprofile.js
,user-Profile.js
,userProfile.js
are notFixes: #{$ISSUE_NO}
.