Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

ID: 3805089 • Letter: 1

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 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

O(1)

O(n)

O(n log n)

O(n2)

it depends on the operation

Explanation / Answer

1. In an ideal implementations of a stack and a queue, all operations are ___________O(1)
2. In a radix sort, the radix refers to ___________the range of values of the sort key___Otherwise the base_____ .
3. evaluating a postfix expression
4. evaluating a infix expression

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 ___O(n) [Remove and shift all the elements by 1]

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

True [Definitely]