Question: 1. In an ideal implementations of a stack and a queue, all operations are ______________________ . O(1) O(n) O(n log n) O(n2) it depends on

1.

In an ideal implementations of a stack and a queue, all operations are ______________________ .

O(1)

O(n)

O(n log n)

O(n2)

it depends on the operation

2.

In a radix sort, the radix refers to __________________________ .

a circular array

the number of elements being sorted

the range of values of the sort key

a stack

a queue

3.

A stack is the ideal collection to use when _______________________ .

implementing a radix sort

evaluating a postfix expression

evaluating an infix expression

implementing a quick sort

none of the above

4.

A queue is the ideal collection to use when ____________________ .

implementing a radix sort

evaluating a postfix expression

evaluating an infix expression

implementing a quick sort

none of the above

5.

In a array-based implementation of a queue that stores the front of the queue at index 0 in the array, the dequeue operation is ___________________.

impossible to implement

has several special cases

O(n)

O(n2)

none of the above

6.

It is only possible to implement a stack using a linked structure.

True

False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!