Review: Median Problems

Review: Median Problems



Key Observations For Median:

  • Examine nodes before and after medians, we know: abs(count(left nodes) – count(right nodes)) <= 1

Median Employee Salary

  • For medians, we know: the occurence of current value >= abs(count(bigger nodes)-count(smaller nodes))

Find Median Given Frequency of Numbers


See all getmedian problems: #getmedian

See more blog_posts.

linkedin
github
slack

Share It, If You Like It.

Leave a Reply

Your email address will not be published.