Filters
Question type

Study Flashcards

Which of the following is NOT an important factor to consider by a manager of a supermarket trying to schedule checkout cashiers?


A) the frequency with which new customers arrive
B) the number of checkout cashiers available
C) the number of items in a customer's shopping cart
D) the number of aisles in the supermarket

E) A) and C)
F) C) and D)

Correct Answer

verifed

verified

Which type of computer activity would likely be assigned to the priority queue?


A) a background process that defragments the disk
B) sending email
C) mouse movement
D) a background process that releases unused memory blocks

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

The most common type of CPU scheduling technique is called last in, first-out.

A) True
B) False

Correct Answer

verifed

verified

What type of collection is a queue?


A) linear
B) parallel
C) random
D) geometric

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

In the following code for the pop method for a linked queue implementation, what is the missing code? Def pop(self) : OldItem = self.front.data Self.front = self.front.next If self.front is None: Self.rear = None < missing code > Return oldItem


A) self.rear -= 1
B) self.front = self.rear
C) self.size -= 1
D) self.size += 1

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

Both classes, LinkedStack and LinkedQueue, use a singly linked Node class to implement nodes.

A) True
B) False

Correct Answer

verifed

verified

Which example best represents a queue?


A) print jobs sent to a printer
B) a pickup game of football
C) items selected via a random number generator
D) people exiting a sporting event

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

What is the solution to achieving good performance for both the add and pop methods in the array implementation of a queue?


A) using a front pointer that advanced through the array
B) using a fixed front pointer to index position 0
C) using an insert function instead of add
D) using a circular array implementation

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

What is one reason that it is difficult to devise formulas to answer simple questions about a supermarket checkout system?


A) the variability of essential factors
B) the regularity in which customers arrive
C) because customers always purchase the same number of items
D) because the same number of customers are there at all times of the day

E) All of the above
F) A) and D)

Correct Answer

verifed

verified

Which protocol is supported by queues?


A) last-in first-out
B) last-in last-out
C) first-in first-out
D) first-in last-out

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

Showing 41 - 50 of 50

Related Exams

Show Answer