Linear Structure

¡Supera tus tareas y exámenes ahora con Quizwiz!

The following sequence of operations is performed on a queue: enqueue(1), enqueue(2), dequeue, enqueue(1), enqueue(2), dequeue, dequeue, dequeue, enqueue(2), dequeue. The values will be output in this order:

1,2,1,2,2

The terms "insert" and "delete" are traditionally associated with which data structure(s)?

List

The terms "push" and "pop" are associated with which data structure?

Stack

Which data structure would be used to implement recursion?

Stack

It is an error to pop data from a(n) _______ stack.

Empty

A doubly linked list is a pair of singly linked lists that each interconnect the same nodes.

False

Which of the following operations is performed more efficiently by a doubly linked list implementation than by singly linked list?

Finding the node preceding the current node

The Stack is best characterized as:

Last-In, First-Out

The term "FIFO" is associated with which data structure?

Queue

Which data structure allows insertion only at the back, and removing only from the front?

Queue

Which of the following is not a linear data structure? Queue Array-based list Tree Linked list Stack

Tree

In a singly linked list implementation, to access the predecessor of the current node we must start at the first node in the list.

True

Given a linked list implementation, deleting the element at arbitrary position iii takes how long in the average case?

Θ(i) time

Given an array-based list implementation, deleting the element at arbitrary position iii takes how long in the average case?

Θ(n) time

Suppose cursor points to a node in a linked list. Which statement changes cursor so that it points to the next node?

cursor = cursor.next();


Conjuntos de estudio relacionados

Quizzes for Ultrasound & Electrical Modalities

View Set

NURS 401 PrepU Ch. 24: Management of Patients With Chronic Pulmonary Disease

View Set

Lesson 5 - Transcription, Translation and DNA Repair

View Set

Management EAQ - Answers I missed

View Set

Chapter 4 IT INFRASTRUCTURE : HARDWARE AND SOFTWARE

View Set

Accounting - C8 - Reporting and Analyzing Receivables

View Set