Why is a circular queue preferred over a simple linear array queue?
Correct answer D. It reuses array slots freed by dequeues, so space at the front is not wasted
Subject / 421 questions
Page 4 of Programming multiple-choice questions with answers. Tap an option to check yourself.
Page 4 of 22
Correct answer D. It reuses array slots freed by dequeues, so space at the front is not wasted
Correct answer D. front = 2, rear = 0
Correct answer B. A queue that allows insertion and deletion at both ends
Correct answer C. Binary heap
Correct answer A. O(1)
Correct answer A. 16
Correct answer D. 15
Correct answer C. 24
Correct answer B. 11
Correct answer B. Every level is completely filled except possibly the last, which is filled from left to right
Correct answer A. 50, 30, 20, 40, 70, 60, 80
Correct answer D. The operations on the data and their behaviour, without fixing the implementation
Correct answer B. Tree
Correct answer A. A static structure has a size fixed when it is created, while a dynamic one can grow or shrink at run time
Correct answer C. O(1)
Correct answer D. O(n²)
Correct answer C. O(log n)
Correct answer A. How the memory it needs grows with the input size
Correct answer B. Big-Omega (Ω)
Correct answer D. O(n)