wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DEMO

Total questions: 5

Worksheet time: 3mins

Name
Class
Date
1.

Pushing an element into stack already having five elements and stack size of 5, then stack becomes ___________

a)

Overflow

b)

Crash

c)

Underflow

d)

User flow

2.

What is the value of the postfix expression 6 3 2 4 + – *?

a)

18

b)

-18

c)

20

d)

-20

3.

If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?

a)

ABCD

b)

DCBA

c)

ABDC

d)

CDBA

4.

A LINEAR queue, if implemented using an array of size MAX_SIZE, gets full when?

a)

Rear = MAX_SIZE – 1

b)

Front = (rear + 1) mod MAX_SIZE

c)

Front = rear + 1

d)

Rear = front

5.

What is the time complexity of inserting at the end in dynamic arrays?

a)

O(1)

b)

O(n)

c)

O(logn)

d)

Either O(1) or O(n)