\begin{algorithm} \caption{Union of Circular, Doubly Linked List} \begin{algorithmic} \INPUT Circular, doubly linked list with a sentinel $L_1$ and $L_2$ \OUTPUT $L_1 \cup L_2$ \STATE $L_2.nil.next.prev = L_1.nil.prev$ \STATE $L_1.nil.prev.next = L_2.nil.next$ \STATE $L_2.nil.prev.next = L_1.nil$ \STATE $L_1.nil.prev = L_2.nil.prev$ \RETURN $L_1$ \end{algorithmic} \end{algorithm}