inserting node at the end of circular doubly linked list consider the circular doubly linked list shown in fig suppose we want to add new node with data as the last node of the list then the following changes will be done in the linked list start allocate memory for the new node and initialize its data part to take pointer variable ptr that points to the first node of the list startptr move ptr to point to the last node of the list so that the new node can be inserted after it ptr start figure inserting new node at the end of circular doubly linked list figure shows the algorithm to insert new node at the end of circular doubly linked list in step we take pointer variable ptr and initialize it with start that isptr now points to the first node of the linked list in the while loopwe traverse through the linked list to reach the last node once we reach the last nodein step we change the next pointer of the last node to store the address of the new node the prev field of the new_node will be set so that it points to the node pointed by ptr (now the second last node of the listdeleting node from circular doubly linked list in this sectionwe will see how node is deleted from an already existing circular doubly linked list we will take two cases and then see how deletion is done in each case rest of the cases are same as that given for doubly linked lists case the first node is deleted step if avail null write overflow go to step [end of ifstep set new_node avail step set avail avail -next step set new_node -data val step set new_node -next start step set ptr start step repeat step while ptr -next !start step set ptr ptr -next [end of loopstep set ptr -next new_node step set new_node -prev ptr step set start -prev new_node step exit figure algorithm to insert new node at the end case the last node is deleted deleting the first node from circular doubly linked list consider the circular doubly linked list shown in fig when we want to delete node from the beginning of the listthen the following changes will be done in the linked list figure shows the algorithm to delete the first node from circular doubly linked list in step of the algorithmwe check if the linked list exists or not if start nullthen it signifies that there are no nodes in the list and the control is transferred to the last statement of the algorithm