Company: Amazon_15oct
Difficulty: medium
Code Question 1 Problem Description Picture a newly planned city where a building sits at every integer coordinate of a 2-dimensional plane, and n retailers have set up shop across it. The i-th retailer is located at coordinate (x_i, y_i) and can deliver to any building covered by the rectangle whose four corners are (0, 0), (0, y_i), (x_i, y_i), and (x_i, 0). A point (a, b) counts as covered by a rectangle if it falls inside that rectangle or right on its edge. No two retailers share the same coordinate. Given q delivery requests, each naming a coordinate (a, b), work out how many retailers are able to deliver to the building sitting at that coordinate. Complete the function findNumRetailers in the editor below. The function findNumRetailers has the following parameters: int retailers[n][2] : the retailers' coordinates int requests[q][2] : the coordinates of cities to deliver to Returns: int array[q] : the i^th element is the answer to the i^th query vector findNumRetailers(vector > r