Thanksgiving Sale: Use Coupon Code THANKS25 to Get Extra 25% Off.
items array based on the price in ascending order.items array and update the beauty of each item to be the maximum beauty seen so far.(query, index) for each query, where index is the original index of the query.items array and one for the sorted queries.items pointer forward while the price of the item is less than or equal to the query value, updating the maximum beauty seen so far.