wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DSA_VIVA_2

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

In a circular queue, rear is incremented using:

a)

rear++

b)

(rear + 1)

c)

(rear + 1) % size

d)

(rear – 1) % size

2.

The element deleted from a queue is always from the:

a)

Rear

b)

Middle

c)

Front

d)

Random position

3.

The condition for queue overflow in array implementation is:

a)

front = rear

b)

rear = size – 1

c)

front = -1

d)

rear = front

4.

Which queue allows insertion and deletion at both ends?

a)

Simple Queue

b)

Circular Queue

c)

Priority Queue

d)

Deque

5.

Time complexity of enqueue operation in a queue?

a)

O(1)

b)

O(n)

c)

O(log n)

d)

O(n²)

6.

In linked list implementation of queue, where is enqueue performed?

a)

Head

b)

Tail

c)

Both ends

d)

middle

7.

Which linked list allows traversal in both directions?

a)

Singly linked list

b)

Circular linked list

c)

Doubly linked list

d)

Two-way queue

8.

Time complexity of accessing an element by index in a linked list:

a)

O(1)

b)

O(n)

c)

O(log n)

d)

O(n log n)

9.

In linked lists, memory allocation is:

a)

Sequential

b)

Contiguous

c)

non-Contiguous

d)

fixed-size

10.

Which one does not exist in linked lists?

a)

Overflow

b)

Underflow

c)

Memory leak

d)

Pointer error

11.

In doubly linked list, each node contains:

a)

Only data

b)

Data + next pointer

c)

Data + previous pointer

d)

Data + next + previous pointers

12.

The main disadvantage of linked list over arrays:

a)

Dynamic size

b)

Slow insertion

c)

Extra memory for pointers

d)

Easy deletion