Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
04
:
50
:
02
Back to Dashboard
Response Time Histogram
Easy
You are given a sorted (ascending) array of response times in milliseconds, a fixed bucket width, and a total number of buckets. Distribute the response times into fixed-width buckets indexed 0 through numBuckets - 1, where bucket i covers the range [i * width, (i + 1) * width - 1]. The last bucket acts as an overflow bucket and captures all values greater than or equal to its lower bound. Return an array of length numBuckets where each element is the count of response times in that bucket.
...