1.Easy
In a tree, what are sibling nodes?
- ANodes that share the same parent
- BA node and its parent
- CNodes that have no children
- DNodes at the same depth in different subtrees
2.Easy
What is a deque (double-ended queue)?
- AA structure that allows insertion and removal at both ends
- BA queue sorted by priority
- CTwo separate queues sharing one array
- DA queue that only allows removal at the back
3.Easy
What is the main difference between a static array and a dynamic array?
- AA dynamic array can grow by moving to a larger block of memory
- BA static array allows slower index access
- CA dynamic array stores its elements in linked nodes so it can grow one at a time
- DA static array can only store numbers
4.Medium
Why can a binary heap be stored in an array without any pointers?
- AAll keys in a heap are equal
- BIt is a complete binary tree, so positions follow simple index formulas
- CArrays automatically keep the keys in sorted order, so no pointers are needed
- DHeaps never contain more than 100 elements
5.Medium
How is a new element inserted into a binary heap?
- APlace it at the root and sift it down
- BPlace it at the end of the array and sift it up while it violates the heap property
- CInsert it at its sorted position by shifting all of the larger elements one place right
- DRebuild the whole heap from scratch
6.Medium
Which abstract data type does Dijkstra's algorithm use to choose the next vertex to process?
- AA stack
- BA FIFO queue
- CA set with no ordering
- DA min-priority queue
7.Hard
A Bloom filter can answer "is this element in the set?" with:
- APossible false positives but no false negatives
- BAnswers only for numbers
- CExact answers always
- DPossible false negatives but no false positives
8.Hard
Why can elements not simply be deleted from a standard Bloom filter by clearing their bits?
- ABits in a Bloom filter cannot be changed after creation
- BDeleting would increase the false positive rate to 100%
- CBloom filters store the full elements, and these cannot be located again once hashed
- DThose bits may also belong to other elements, which would cause false negatives
Answer key
- 1. A · Nodes that share the same parent
- 2. A · A structure that allows insertion and removal at both ends
- 3. A · A dynamic array can grow by moving to a larger block of memory
- 4. B · It is a complete binary tree, so positions follow simple index formulas
- 5. B · Place it at the end of the array and sift it up while it violates the heap property
- 6. D · A min-priority queue
- 7. A · Possible false positives but no false negatives
- 8. D · Those bits may also belong to other elements, which would cause false negatives
Full step-by-step solutions: practise this topic on examproblems.com.