logo

MCQ Problems / Explanations



Categories

Jese Leos

Helpdice Team

public int function(){ if(head == null) return Integer.MIN_VALUE; int var; Node temp = head; while(temp.getNext() != head) temp = temp.getNext(); if(temp == head) { var = head.getItem(); head = null; return var; } temp.setNext(head.getNext()); var = head.getItem(); head = head.getNext(); return var;} What is the functionality of the following code? Choose the most appropriate answer.

  • Share On: