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

[Idea]: Swapping Node in a Linked List at kth node #1838

Closed
2 of 5 tasks
SKG24 opened this issue Nov 5, 2024 · 1 comment
Closed
2 of 5 tasks

[Idea]: Swapping Node in a Linked List at kth node #1838

SKG24 opened this issue Nov 5, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels

Comments

@SKG24
Copy link
Contributor

SKG24 commented Nov 5, 2024

Idea Title

Swapping Node in a Linked List at kth node

Idea Description

We are given the head of a linked list, and an integer k.

Return the head of the linked list after swapping the values of the kth node from the beginning and the kth node from the end (the list is 1-indexed).

Input: head = [1,2,3,4,5], k = 2
Output: [1,4,3,2,5]

Potential Benefits

  • Improves user experience
  • Enhances learning
  • Adds a new feature
  • Improves code quality
  • Other

Implementation Suggestions (Optional)

No response

@SKG24 SKG24 added the enhancement New feature or request label Nov 5, 2024
@github-actions github-actions bot added the in-review Indicates that the pull request or issue is currently under review. label Nov 5, 2024
@SKG24
Copy link
Contributor Author

SKG24 commented Nov 5, 2024

I would like to work on it.
gssoc-ext
Thank you!

@ajay-dhangar ajay-dhangar added gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels and removed in-review Indicates that the pull request or issue is currently under review. labels Nov 5, 2024
SKG24 added a commit to SKG24/algo that referenced this issue Nov 6, 2024
We are given the head of a linked list, and an integer k.

Return the head of the linked list after swapping the values of the kth node from the beginning and the kth node from the end (the list is 1-indexed).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels
Projects
None yet
Development

No branches or pull requests

2 participants