Weighted Median
Weighted Median Weighted Median generalizes the ordinary median by assigning a nonnegative weight to each element. Instead of balancing the number of elements on both sides, it balances the total weight. An element is a weighted median if the total weight of smaller elements is at most half of the total weight, and the total weight of larger elements is also at most half. Problem Given pairs $$ (x_1, w_1),...