WorksheetsDSA_VIVA_2
Total questions: 12
Worksheet time: 6mins
In a circular queue, rear is incremented using:
rear++
(rear + 1)
(rear + 1) % size
(rear – 1) % size
The element deleted from a queue is always from the:
Rear
Middle
Front
Random position
The condition for queue overflow in array implementation is:
front = rear
rear = size – 1
front = -1
rear = front
Which queue allows insertion and deletion at both ends?
Simple Queue
Circular Queue
Priority Queue
Deque
Time complexity of enqueue operation in a queue?
O(1)
O(n)
O(log n)
O(n²)
In linked list implementation of queue, where is enqueue performed?
Head
Tail
Both ends
middle
Which linked list allows traversal in both directions?
Singly linked list
Circular linked list
Doubly linked list
Two-way queue
Time complexity of accessing an element by index in a linked list:
O(1)
O(n)
O(log n)
O(n log n)
In linked lists, memory allocation is:
Sequential
Contiguous
non-Contiguous
fixed-size
Which one does not exist in linked lists?
Overflow
Underflow
Memory leak
Pointer error
In doubly linked list, each node contains:
Only data
Data + next pointer
Data + previous pointer
Data + next + previous pointers
The main disadvantage of linked list over arrays:
Dynamic size
Slow insertion
Extra memory for pointers
Easy deletion
