Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 825. Friends Of Appropriate Ages
Count the number of ordered pairs (x → y), x ≠ y, such that age[y] > 0.5*age[x] + 7, age[y] ≤ age[x], and not (age[y] > 100 and age[x] < 100). The core challenge is efficiently counting pairs that satisfy these age-based inequalities (ages are bounded 1..120) without checking all O(n^2) pairs.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid August, 2025
Meta
Mid-level
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.