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 _________________________

What is the output of following function where start pointin…

What is the output of following function where start pointing to first node of following linked list? 1->2->3->4->5->6   void fun (Node  start) {     if(start == NULL)          return;   System.out.println(start.data);      if(start->next != NULL )    fun(start->next->next);    System.out.println(start.data); }  

Consider the following sequence of operations on an empty st…

Consider the following sequence of operations on an empty stack.          push (54); push (52); pop (); push (55); push (62); s = pop ().         Push (20); push (30)  Push (25), pop(), pop(), t= pop();    What is the value of s+t=———————————