public void XXXX() { if (tail == null) { System.out.print…
public void XXXX() { if (tail == null) { System.out.println(“List is empty delete.”); return; } if (head == tail) head = tail = null; else { Node temp = head; while (temp.next != tail) temp = temp.next; temp.next = null; tail = temp; } } Consider the following linked list , if the above function XXXX is applied on the list The number of elements in the list would be _________________________
Read Details