1
Fork 0
blog/_posts/2012-05-07-swap-in-double-linked-lists.markdown
2012-05-07 22:31:24 +02:00

535 B

layout title date
post swap in double-linked lists 07.05.2012 22:22

Yesterday I had to implement Selection Sort for double-linked lists and I had some trouble finding the correct solution when it comes to swapping two elements.

But I finally figured out how to correctly swap the pointers and I'll drop the code here so others can use it (or even tell me about hidden bugs)

I implemented it in Java, so see here: