Deletion at different positions in a 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 ; Traverse second node to first ; Now previous is last node and first node ( firstNode ) link address put in last node ( previous ) link ; Make second node as head node
function DeleteFirst ( head ) { previous = head , firstNode = head ; if ( head == null ) { document . write ( " " ) ; return ; } if ( previous . next == previous ) { head = null ; return ; } while ( previous . next != head ) { previous = previous . next ; } previous . next = firstNode . next ; head = previous . next ; return ; }