Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP ME! I will give high rate and comment as lifesaver. What type of behavior defines a queue? first-in last-out first-in first-out last-in first-out

PLEASE HELP ME! I will give high rate and comment as lifesaver.

What type of behavior defines a queue?

first-in last-out
first-in first-out
last-in first-out
none of the above

Flag this Question

Question 21 pts

Where does a queue add new items?

randomly
in the middle
at the back
at the front

Flag this Question

Question 31 pts

Where will you find the item added earliest to a queue?

randomly
in the middle
at the back
at the front

Flag this Question

Question 41 pts

9. After the following statements execute, what item is at the front of the queue? QueueInterface zooDelivery = new LinkedQueue(); zooDelivery .enqueue(lion); zooDelivery .enqueue(tiger); zooDelivery .enqueue(cheetah); String next = zooDelivery .dequeue(); next = zooDelivery .dequeue(); zooDelivery .enqueue(jaguar);

"cheetah"
"jaguar"
"tiger"
"lion"

Flag this Question

Question 51 pts

What item is at the front of the list after these statements are executed? DequeInterface waitingLine = new LinkedDeque(); waitingLine.addToFront(Jack); waitingLine.addToFront(Rudy); waitingLine.addToBack(Larry); waitingLine.addToBack(Sam); String name = waitingLine.getFront();

Jack
Rudy
Larry
Sam

Flag this Question

Question 61 pts

What item is at the front of the list after these statements are executed? DequeInterface waitingLine = new LinkedDeque(); waitingLine.addToFront(Jack); waitingLine.addToFront(Rudy); waitingLine.addToBack(Larry); waitingLine.addToBack(Sam); String name = waitingLine.getBack();

Jack
Rudy
Larry
Sam

Flag this Question

Question 71 pts

What item is at the front of the list after these statements are executed? DequeInterface waitingLine = new LinkedDeque(); waitingLine.addToFront(Jack); waitingLine.addToBack(Rudy); waitingLine.addToBack(Larry); waitingLine.addToFront(Sam); String name = waitingLine.getFront(); name = waitingLine.getBack();

Sam
Adam
Rudy
Jack

Flag this Question

Question 81 pts

In a circular array-based implementation of a queue, the initial size of the array should be

two more than the queues initial capacity
two less than the queues initial capacity
one more than the queues initial capacity
one less than the queues initial capacity

Flag this Question

Question 91 pts

In a circular array-based implementation of a queue, what is the performance when the dequeue operation ?

O(1)
O(logn)
O(n)
O(n2)

Flag this Question

Question 101 pts

In a linked chain implementation of a queue, the performance of the enqueue operation is

O(1)
O(logn)
O(n)
O(n2)

Flag this Question

Question 111 pts

In the linked chain implementation of a queue, the chains first node contains

the queues front entry
the queues back entry
both a & b
none of the above

Flag this Question

Question 121 pts

To efficiently remove a node at the end of a linked chain implementation of a queue requires a

tail reference
traversal
extra reference in the node pointing to the previous node
none of the above

Flag this Question

Question 131 pts

When a linked chain contains nodes that reference both the next node and the previous node, it is called a(n)

multi-linked chain
two-way linked chain
doubly linked chain
ordinary chain

Flag this Question

Question 141 pts

Imagine you have an empty queue of strings named queue. What is the contents of the queue from front to rear, (listed left to right below), after the following operations have executed.

queue.enqueue("K"); queue.enqueue("P"); queue.dequeue(); queue.enqueue("G"); String str = queue.getFront(); queue.enqueue("R"); queue.dequeue(); queue.enqueue("V"); queue.enqueue(str); 
GRVP
GVGK
KPGR
KGRVP
PGRVP

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago