\begin{algorithm} \caption{Singly Circular Linked List} \begin{algorithmic} \ENSURE Implementation of dictionary operations with singly circular linked list \PROCEDURE{Insert}{$L, x$} \STATE $x.next = L.nil.next$ \STATE $L.nil.next = L$ \ENDPROCEDURE \STATE \PROCEDURE{Delete}{$L, x$} \STATE $p = L.nil$ \WHILE{$p.next \ne x$} \IF{$p.next == L.nil$} \STATE \textbf{error} "$x$ doesn't exist in $L$" \ENDIF \STATE $p = p.next$ \ENDWHILE \STATE $p.next = x.next$ \ENDPROCEDURE \STATE \PROCEDURE{Search}{$L, k$} \STATE $x = L.nil.next$ \WHILE{$x \ne L.nil$ \AND $x.key \ne k$} \STATE $x = x.next$ \ENDWHILE \RETURN $x$ \ENDPROCEDURE \end{algorithmic} \end{algorithm}