Practice
Learn
← Quit
0 / 0 correct
Data Structures
Hard
1 of 10
A circular buffer of capacity N uses head and tail indices. How do you distinguish full from empty?
A
Use a separate hash set
B
Check if the first element is zero
C
Track a count (or keep one slot always empty), since head == tail is ambiguous otherwise
D
They can't be distinguished