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