Ch 18

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

The advantage a linked list has over a vector is that a. a linked list can dynamically shrink or grow and a vector cannot b. a linked list is smaller than a vector c. a node can be inserted or removed faster from a linked list than from a vector d. data removal and insertion are more accurate with a linked list than with a vector e. None of these

C

Which type of list does not contain a null pointer at the end of the list? a. backwards linked b. doubly linked c. circular linked d. null linked e. None of these

C

A list that contains pointers to the previous node, the next node, and a node in the third dimension is known as a triple linked list.

F

A new node cannot become the first node in the list.

F

A new node must always be made the last node in the list.

F

Deleting an entire list simply requires the use of the delete operator.

F

If there are no nodes in a linked list, you cannot append a node to the list.

F

Linked lists are less complex to code and manage than arrays.

F

Nodes in a linked list are stored in contiguous memory.

F

When you create a linked list you must know in advance how many nodes the list will contain.

F

If the head pointer points to nullptr, this indicates a. the list has been previously created and then destroyed b. the list needs to be destroyed c. there are no nodes in the list d. the list is full and cannot accept any new nodes e. None of these

C

In a circular linked list, the last node points to the a. head pointer b. tail pointer c. first node d. None of these

C

If new data needs to be added to a linked list, the program simply __________ and inserts it into the series. a. allocates another node b. removes a node c. borrows a node from the compiler d. Either B or C e. None of these

A

In an insertion or deletion routine: how many pointers are you required to create for use during the traversal process? a. two: one for the node under inspection and one for the previous node b. two: one for the node under inspection and one for the next node c. one: for the node being inserted or deleted d. three: one for the node under inspection, one for the next node, and one for the following node

A

The last node in a linked list points to a. a null pointer b. the previous node c. the first node in the list d. nothing; the last node does not contain a pointer e. None of these

A

Select all that apply. Which of the following is a basic list operation? a. appending a node b. traversing the list c. inserting a node d. deleting a node e. None of these

A,B,C,D

Select all that apply. Variations of the linked list are a. doubly linked list b. circular linked list c. frontward linked list d. backward linked list

A,B,D

Select all that apply. Which of the following containers can add elements at their back without requiring traversal? a. the list container b. the circular_list container c. the forward_list container d. the reversal_list container

A,C

A __________ is used to travel through a linked list and search for data. a. node b. pointer c. null pointer d. traversal operator e. None of these

B

A linked list class must take care of removing the dynamically allocated nodes and this is done by a. the constructor function b. the destructor function c. overriding the removal function d. overloading the memory persistence operator e. None of these

B

How many steps are involved in the process of deleting a node? a. one: delete the node from memory b. two: remove the node without breaking links, then delete it from memory c. three: create a blank node, remove the node being deleted, insert the blank node d. four: create a blank node, insert the blank node before the node being deleted, remove the node being deleted, delete the blank node e. None of these

B

Select all that apply. While traversing a list, a node pointer knows when it has reached the end of the list if a. it encounters the newline character b. it encounters a null pointer c. it finds itself back at the beginning of the list d. it encounters a sentinel such as 9999

B

The __________ of a linked list points to the first node in the list. a. starter b. head c. tail d. declaration e. None of these

B

The list container provided by the Standard Template Library is a template version of a a. singly linked list b. doubly linked list c. circular linked list d. backward linked list e. None of these

B

The process of moving through a linked list is referred to as __________ the list. a. cruising b. traversing c. hopping d. revising e. None of these

B

To build a list initally, you can use a(n) __________ routine. a. build b. append c. constructor d. initialization e. None of these

B

Select all that apply. A __________ list contains pointers to the nodes before it and after it. a. multi linked b. circular linked c. singly linked d. doubly linked

B,C,D

ADT stands for a. Algorithm Dependent Template b. Algorithm Driven Template c. Abstract Data Type d. Automatic Data Type e. None of these

C

A doubly linked list keeps track of the next node in the list as well as a. itself b. the head node c. the tail node d. the previous node e. None of these

D

A linked list is a series of connected a. ADTs b. vectors c. algorithms d. nodes e. None of these

D

Appending a node means adding it to the end of a list, and __________ a node means putting a new node in the list, but not necessarily at the end. a. concatenating b. popping c. clamping d. inserting e. None of these

D

To append a node to a list means to a. delete a node from the beginning of the list b. delete a node from the end of the list c. add a node to the beginning of the list d. add a node to the end of the list e. None of these

D

To create a linked list you must first create a(n) a. header file b. function template c. exception d. struct e. None of these

D

To insert a new node in ascending order into a list, the list must be a. arranged in descending order b. randomly ordered c. empty d. arranged in ascending order e. None of these

D

A linked list can consist of structs, objects, and other abstract data types.

T

A linked list can grow and shrink as a program runs.

T

A linked list is called "linked" because each node in the series has a pointer that points to the next node in the list.

T

The Standard Template Library (STL) provides a linked list container.

T

To delete an entire list, normally you must traverse the list, deleting each node, one by one.

T

When working with a linked list one of the basic operations you can perform is to destroy the list.

T

When you delete a node from a list, you must ensure that the links in the list are not permanently broken.

T


Set pelajaran terkait

BPH, Prostate cancer, TURP/CBI, Erectile Dysfunction

View Set

Fluid and Electrolytes, Acid-Base

View Set

Lewis Ch. 22 - Assessment of Integumentary System

View Set

COMM 1101 Exam 1: Chapter 6 (Topic Development)

View Set