Circular Singly Linked List | Insertion |  ; This function is only for empty list ; Creating a node dynamically . ; Assigning the data . ; Note : list was empty . We link single node to itself .
static Node addToEmpty ( Node last , int data ) { if ( last != null ) return last ; Node temp = ( Node * ) malloc ( sizeof ( Node ) ) ; temp . data = data ; last = temp ; temp . next = last ; return last ; }