FoundationNumeric answer
A ring buffer has capacity and wraps its index with a bit mask instead of a modulo. What mask value is used?
Answer with a number. Fractions, powers and expressions like 23/6 or C(52,5) are read correctly in practice.
The worked solution is in Premium
The answer, the full working and the one idea to take away – for this and all 1,322 questions in the bank. Answer it in practice and your working is marked, with a known mistake named when you make one.
Learn the method
Reported in interviews at
More systems and low latency questions
- Per-thread counters, part 1 of 3Foundation
- Five per cent of a workload is inherently serial.Applied
- A system handles 10⁶ messages a second with an average time in system of 5 μs.Applied
- Thread 1 locks A then B; thread 2 locks B then A.Applied
- Messages arrive at 400,000 a second and take 2 μs each to process on one thread.Advanced
- What synchronisation does a single-producer, single-consumer ring buffer need…Advanced