Linear Structure

Ace your homework & exams now with Quizwiz!

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

Queue

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

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

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

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

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();

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


Related study sets

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