Suppose that I have a set of apples, each apple has two attributes which is weight and price. Please give me a maximal subset which the weight should be arranged in ascending order and price should be arranged in descending order.
examples:
100, 200
102, 102
104, 105
105, 104
Output:
100, 200
104, 105
105, 104