Exam 16: Linked Lists

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The ____________________ operator advances the iterator to the next node in the linked list.

Free
(Short Answer)
4.8/5
(39)
Correct Answer:
Verified

increment

A linked list must be searched ____________________,starting from the first node.

Free
(Short Answer)
4.8/5
(39)
Correct Answer:
Verified

sequentially

Consider the following code,which deletes all the nodes in a linked list. void doublyLinkedList<Type>::destroy() { \quad NodeType<Type> *temp; //pointer to delete the node \quad While (first != NULL) \quad { \quad\quad Temp = first; \quad\quad First = first->next; \quad\quad ____ \quad } \quad Last = NULL; \quad Count = 0; } Which of the following is the missing statement?

Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
Verified

B

The deleteNode operation (if the item to be deleted is in a doubly linked list)requires the adjustment of ____ pointer(s)in certain nodes.

(Multiple Choice)
4.8/5
(40)

template <class Type> ____ doublyLinkedList<Type>::isEmptyList() const { \quad return (first == NULL); } -Which of the following statements appears in the insert function of a doubly linked list?

(Multiple Choice)
4.7/5
(34)

Which of the following is a basic operation on singly linked lists?

(Multiple Choice)
4.9/5
(40)

Which of the following correctly initializes a doubly linked list in the default constructor?

(Multiple Choice)
4.8/5
(44)

template <class Type> ____ doublyLinkedList<Type>::isEmptyList() const { \quad return (first == NULL); } -Consider the accompanying statements.The list is empty if the pointer first is ____.

(Multiple Choice)
4.8/5
(32)

It is not possible to create an ordered linked list.

(True/False)
4.7/5
(44)

The ____________________ constructor can make an identical copy of a linked list.

(Short Answer)
4.9/5
(39)

What is the output of the following program segment? (The class unorderedLinkedList is as defined in the book.) unorderedLinkedList<int> list; List.insertFirst(6); List.insertLast(5); List.insertFirst(4); List.insertFirst(8); List.insertLast(10); List.deleteNode(4); List.insertFirst(1); List.print();

(Multiple Choice)
4.9/5
(37)

In a linked list,the ____________________ operator returns the info of the current node.

(Short Answer)
4.8/5
(31)

In a linked list,the link component of each node is a(n)____________________.

(Short Answer)
4.9/5
(30)

The steps involved in inserting a new item at the beginning of an unordered linked list are ____.

(Multiple Choice)
4.8/5
(30)

You deallocate the memory for a linked list by calling the operator clear.

(True/False)
4.8/5
(38)

A linked list is a collection of components called ____.

(Multiple Choice)
4.8/5
(45)

When you build a linked list in the backward manner,a new node is always inserted at the end of the linked list.

(True/False)
4.8/5
(39)

A doubly linked list can be traversed in either direction.

(True/False)
4.8/5
(30)

When building a linked list in the ____ manner,a new node is always inserted at the end of the linked list.

(Multiple Choice)
5.0/5
(37)

In a circular linked list with more than one node,it is convenient to make the pointer first point to the ____________________ node of the list.

(Short Answer)
4.7/5
(30)
Showing 1 - 20 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)