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