Jump to content

PHP linked list swap nodes


lordofcheese

Recommended Posts

I want a function in my linked list to swap two nodes.  That is, I want the first node to move to where the second node is while retaining the next and prev references in the first node somehow in order to assign these references to the second node.  I am having a lot of trouble.  Anyone know how this can be done?

Link to comment
https://forums.phpfreaks.com/topic/116257-php-linked-list-swap-nodes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.