Deletion at different positions in a Circular Linked List | Function to delete last node of Circular Linked List ; Check if list doesn 't have any node  if not then return ; Check if list have single node if yes then delete it and return ; Move first node to last previous
static Node DeleteLast ( Node head ) { Node current = head , temp = head , previous = null ; if ( head == null ) { System . out . printf ( " List is empty "); return null ; } if ( current . next == current ) { head = null ; return null ; } while ( current . next != head ) { previous = current ; current = current . next ; } previous . next = current . next ; head = previous . next ; return head ; }