Skip to content

Sadhiin/python linkedlist Linked List Reversal Function #91

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

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

Conversation

sadhiin
Copy link
Contributor

@sadhiin sadhiin commented Oct 15, 2024

Add Linked List Reversal Function

Description

This PR adds a new function revrese_lined_list to the linkedlist.py file. The function reverses a linked list in-place using an iterative approach.

Changes

  • Added revrese_lined_list function that takes the head of a linked list as input and returns the new head of the reversed list
  • The function uses an iterative approach with O(n) time complexity and O(1) space complexity

Testing

Please test the new function with various linked list scenarios, including:

  • Empty list
  • Single node list
  • List with multiple nodes

Notes

  • The function name has a typo: "revrese" instead of "reverse". Consider fixing this in a follow-up commit.
  • The existing code style is maintained for consistency

@sadhiin
Copy link
Contributor Author

sadhiin commented Oct 15, 2024

@extinctsion
Hi buddy... !
Please have look on this PR #91 for hacktoberfest24.

@extinctsion extinctsion added hactoberfest-accepted accepting for hactobertfest hacktoberfest-accepted and removed hactoberfest-accepted accepting for hactobertfest labels Oct 15, 2024
@extinctsion
Copy link
Owner

Hi @sadhiin, thanks for contributing in hacktoberfest. I have labelled ur PR as accepted and it will count as contribution. I have many PRs to review in other repo. Also, can you check why all the tests are failing and can you fix them?

@extinctsion
Copy link
Owner

@AndrewHUNGNguyen, can you pls look after this PR and review?

@extinctsion
Copy link
Owner

Hi buddy, recently we have fixed the checks issue, I would recommend you to pls take pull from main branch and merge it with you branch and then again push. This would resolve the pipeline issue. I'll then merge your code after review

…edlist

Hacktoberfest2024 contribution with updated/solved issue with github
action.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants