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

Added a solution to Question 42 of Leetcode #30

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

ZahraShahid
Copy link
Contributor

This is a template on how to fill out a PR properly.

Description

An algorithm to remove the nth Node from the end of the linked list.

This algorithm uses the curr pointer to loop over the LinkedList and store its total length in a variable.
If the node required to remove resides at the end of the list, it's removed and head pointer is returned.
Else, the curr pointer loops over the list again for the (length-requiredNodeNumberfromLast) to remove the desired Node

Closes #24

Related Issue

Acceptance Criteria

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
💯 Add tests
🔗 Update dependencies
📜 Docs

Testing Steps / QA Criteria

leetcode

@DugarRishab
Copy link
Owner

Good work @ZahraShahid

@DugarRishab DugarRishab merged commit 2762e76 into DugarRishab:main Oct 3, 2022
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.

[FEATURE]: Add solution to Q41 to Q50 of Leetcode
3 participants