Multiple Choice
Assuming a linked list of n nodes,the code fragment: Node curr = head;
While (curr != null) {
System.out.println(curr.getItem() ) ;
Curr.setNext(curr.getNext() ) ;
} // end while
Requires ______ assignments.
A) n
B) n - 1
C) n + 1
D) 1
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q33: Compare the efficiencies of the quicksort and
Q34: A quadratic algorithm has the growth-rate function
Q35: What is the sort key of a
Q36: Algorithm analysis should be independent of all
Q37: The _ compares adjacent items and exchanges
Q39: Consider the following nested loop.What is the
Q40: Which of the following growth-rate functions indicates
Q41: What is an external sort?
Q42: The value of which of the following
Q43: Suppose we have three algorithms,and their orders