Examlex

Solved

A Linked List Class Uses a Node Class with a Successor

question 11

Multiple Choice

A linked list class uses a Node class with a successor reference next to represent nodes.A private recursive method
Node add(int index,E element,Node list) takes a reference list (referring to the first in a chain of Node objects) ,adds a node containing the given element at the given index,and returns a reference to the first node of the resulting chain.Assume that index is nonnegative and is less or equal to the size of list.Under these circumstances,the add method should handle its non-base case (index is not 0) by


Definitions:

Related Questions