Skip to content

feat: add Swap method to exchange ordering of elements - #66

Open
AdamMagued wants to merge 1 commit into
elliotchance:masterfrom
AdamMagued:fix-issue-59
Open

AdamMagued wants to merge 1 commit into
elliotchance:masterfrom
AdamMagued:fix-issue-59

Conversation

@AdamMagued

@AdamMagued AdamMagued commented Oct 9, 2026 •

Copy link
Copy Markdown

Fixes #59

Summary

  • Added Swap helper to swap element positions within the ordered map doubly-linked list in O(1) time.
  • Added unit tests covering swap operations across head, tail, adjacent, and identical nodes.

Verified via container sandbox test suite.


This change is Reviewable

Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Have a swapIndices(from,to) method

1 participant