Swapping circular linked list nodes around
<p>basically I have to move a set of nodes in a circular linked list to a different spot in the same linked list.</p>

<pre><code>      prev  ptr
</code></pre>

<p>[1]-->[2]-->[3]-->[4]<br>
&lt;--------------------<br>
Let's say I wanted to move 1 and 2 between 3 and 4, and have 4 circle back to 3.
I have temp pointers that point to 1 (temp1), 3 (temp3), and 4 (temp4).
I assume these are the important pointers to manipulate so I set temps for them.</p>

<p>How can I set the prev and ptr pointers to coordinate with the temp pointers?
This is very confusing, any combination I put together and try to print the list,
it will put me into an infinite loop. I want to understand a precise method in approaching
this. Thank you.</p>
