Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 571. Find Median Given Frequency of Numbers
Given an array of frequencies where freq[i] is the count of value i (counts may be large), compute the median of the implicit multiset without expanding it; handle odd vs even total counts and return the middle value (or average of two middle values) efficiently using prefix sums or binary search on cumulative counts.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early November, 2024
Amazon
Junior
Find Median from Data Stream
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.