Algorithm for deleting a node from the end in circular doubly linked list


Step 1: IF START = NULL 
          Write UNDERFLOW 
          Go to Step 8 
        [END OF IF] 
Step 2: SET PTR = START   
Step 3: Repeat Step 4 while PTR -> NEXT != START 
Step 4: SET PTR = PTR -> NEXT 
         [END OF LOOP]
Step 5: SET PTR -> PREV -> NEXT = START
Step 6: SET START -> PREV = PTR -> PREV
Step 7: FREE PTR 
Step 8: EXTI