Bloomberg logoBloomberg
Coding·60 minMembers

Friends Of Appropriate Ages

Members only

Given an array of ages, count the number of valid friend requests under the rule that person A will request person B iff B's age is in `(0.5*A + 7, A]`. Bloomberg insists on the `O(σ^2)` bucket-freque...

SWE
array
hashmap
math
prefix-sum
medium
Frequency
Single report
Last asked
2025-11-22
Stage
onsite-coding

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...