New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Datadog
Coding Question
AI Insights
Quick Summary
Map each latency value to a fixed-width bucket using direct mathematical calculation.
Clamp calculated indices to the valid range, directing out-of-bounds values to the final overflow bucket.
Count occurrences in a single pass to build the frequency histogram.
What This Tests
Array traversal and iteration
Integer division and mathematical mapping
Boundary condition handling and clamping
Frequency counting / histogram generation
Common Patterns
Hashing
Sorting
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
1.7k
/2.4k
Acceptance Rate
71.2%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
latencies =
numOfBuckets =
bucketWidth =
Output
Expected