81. First link node of list is accessed from a pointer named
a. Tail
b. Head
c. Terminator
d. Initiator
Answer: (b).Head

82. A linked list is made up of a set of objects known as
a. Nodes
b. Arrays
c. Entities
d. Instances
Answer: (a).Nodes

83. Definition of a list is to be
a. Finite
b. Inifinte
c. No-limit
d. Empty
Answer: (a).Finite

84. Beginnning of any list is called its
a. Pointer
b. Head
c. Initializer
d. Automator
Answer: (b).Head

85. Key design decision embodied in this ADT is support for concept of a
a. Partition
b. Parameter
c. Current position
d. Current element
Answer: (c).Current position

86. A pointer that is used to keep last link of list is called
a. Head
b. Initiator
c. Tail
d. Terminator
Answer: (c).Tail

87. End of any list is called its
a. Tail
b. Terminator
c. Aborter
d. Committer
Answer: (a).Tail

88. Important concept related to lists is of
a. Location
b. Position
c. Arrays
d. Pointers
Answer: (b).Position

89. Which of the following is false about a doubly linked list?
a. We can navigate in both the directions
b. It requires more space than a singly linked list
c. The insertion and deletion of a node take a bit longer
d. None of the mentioned
Answer: (d).None of the mentioned

90. Given the Node class implementation, select one of the following that correctly inserts a node at the tail of the list.
public class Node
{
	protected int data;
	protected Node prev;
	protected Node next;
	public Node(int data)
	{
		this.data = data;
		prev = null;
		next = null;
	}
	public Node(int data, Node prev, Node next)
	{
		this.data = data;
		this.prev = prev;
		this.next = next;
	}
	public int getData()
	{
		return data;
	}
	public void setData(int data)
	{
		this.data = data;
	}
	public Node getPrev()
	{
		return prev;
	}
	public void setPrev(Node prev)
	{
		this.prev = prev;
	}
	public Node getNext
	{
		return next;
	}
	public void setNext(Node next)
	{
		this.next = next;
	}
}
public class DLL
{
	protected Node head;
	protected Node tail;
	int length;
	public DLL()
	{
		head = new Node(Integer.MIN_VALUE,null,null);
		tail = new Node(Integer.MIN_VALUE,null,null);
		head.setNext(tail);
		length = 0;
	}
}


a)

public void insertRear(int data)
{
	Node node = new Node(data,tail.getPrev(),tail);
	node.getPrev().setNext(node);
	tail.setPrev(node);
	length++;
}

b)

public void insertRear(int data)
{
	Node node = new Node(data,tail.getPrev(),tail);
	node.getPrev().getPrev().setNext(node);
	tail.setPrev(node);
	length++;
}

c)

public void insertRear(int data)
{
	Node node = new Node(data,tail.getPrev(),tail);
	node.getPrev().setNext(tail);
	tail.setPrev(node);
	length++;
}

d)

public void insertRear(int data)
{
	Node node = new Node(data,head,tail);
	node.getPrev().setNext(node);
	tail.setPrev(node);
	length++;
}
a. a
b. b
c. c
d. d
Answer: (a).a