Smallest Starting Value That Keeps a Running Total Positive
Asked at Confluent · Coding Questions · Difficulty: Easy · Last asked Jul 15, 2026
Starting from `5`, the running totals are `2, 4, 1, 5, 7`, all at least `1`. Starting from `4` they would be `1, 3, 0, ...`, and the third total is `0`.
Loading the problem…
More Confluent interview questions
- Design Scalable TinyURL Service with One-to-One URL Mapping
- Design a podcast publishing and feed system
- Phrase search over multiple documents
- Warehouse Loading: Reach TargetWeight at Any Point with Reordered +/- Weights
- Pairwise Modulo Checksum: Sum of i mod j + j mod i up to n
- Random Queue ADT + Equality + Thread Safety + RLE-backed Comparison