Hacktoberfest: Add group_odd_even_nodes algorithm to Linked Lists#3573
Hacktoberfest: Add group_odd_even_nodes algorithm to Linked Lists#3573shermanhui wants to merge 2 commits intoTheAlgorithms:masterfrom
group_odd_even_nodes algorithm to Linked Lists#3573Conversation
32c2535 to
4916b8d
Compare
ae6afc7 to
ab52157
Compare
Adding the algorithm I used to solve https://leetcode.com/problems/odd-even-linked-list/ This groups odd indexed nodes in a Linked List at the beginning of the list and then the even indexed nodes following the odd indexed nodes. Note that the nodes are not grouped by their value but by their index. This algo runs in O(1) space and O(n) time. Add geeksforgeeks url for additional details on algorithm
bff2d38 to
dac47aa
Compare
|
@mateuszz0000 @poyea I know the reviewers are super swamped due to the influx of Hacktoberfest PRs 😅 , but just pinging for a review here as I feel that I've taken the efforts to follow through the contributing guidelines to genuinely participate in the spirit of Hacktoberfest, but my PR was buried under a lot of invalid ones. Appreciate it! 👍 |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Please reopen this pull request once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions! |


Describe your change:
Adding the algorithm I used to solve
https://leetcode.com/problems/odd-even-linked-list/
for #2510
This groups odd indexed nodes in a Linked List at the beginning of the
list and then the even indexed nodes following the odd indexed nodes.
Note that the nodes are not grouped by their value but by their
index. This algo runs in O(1) space and O(n) time.
Checklist:
Fixes: #{$ISSUE_NO}.