Skip to content

feat: add LeetCode problem 92 - #1585

Open
darshan0548 wants to merge 1 commit into
TheAlgorithms:masterfrom
darshan0548:solution/reverse-linked-list
Open

feat: add LeetCode problem 92#1585
darshan0548 wants to merge 1 commit into
TheAlgorithms:masterfrom
darshan0548:solution/reverse-linked-list

Conversation

@darshan0548

Copy link
Copy Markdown

Adds an iterative C solution for LeetCode #92 "Reverse Linked List II" —
reverses the sublist of a singly linked list between positions left and
right (1-indexed), using a dummy node and the standard prev/curr
pointer-reversal technique.

Description of Change

Iterative reversal of a sublist (positions left to right) in a singly
linked list, using a dummy node to simplify the edge case where left == 1.

References

N/A

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Iterative solution, O(n) time, O(1) space.

Add iterative solution for Reverse Linked List II
@github-actions github-actions Bot added the Leetcode folder changes Changes to Leetcode folder. Known CI issues. label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Leetcode folder changes Changes to Leetcode folder. Known CI issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant