An observability team streams n latency measurements, in microseconds, recorded for requests to a single service endpoint. Every measurement must be sorted into exactly one of three fixed performance tiers, using these rules:
Report how many measurements fall into each tier, always naming all three tiers even when a tier's count is zero.
A single line with three space-separated integers: the Fast count, the Normal count, and the Slow count, in that exact order.
Example 1
Input
5 15000 20000 50000 50001 100
Expected
2 2 1
Explanation
15000 and 100 are below 20000, so they are Fast (2 total). 20000 and 50000 land in the inclusive Normal band [20000, 50000] (2 total). 50001 is above 50000, so it is Slow (1 total). Output: 2 2 1.
Example 2
Input
3 100000 100000 100000
Expected
0 0 3
Explanation
All three measurements are far above 50000, so every one lands in the Slow tier while Fast and Normal stay empty. Output: 0 0 3.
Ready to solve this?
Sign in to open the editor, run your code against the sample tests, and submit against the full test suite.
Sign in to solve →