Count Retailers Covering a City
Asked at Amazon · Coding Questions · Difficulty: Medium
Retailer `i` at `(x[i], y[i])` covers the rectangle from `(0,0)` to `(x[i], y[i])` (inclusive). A city `(a, b)` is covered when `x[i] >= a` and `y[i] >= b`. For each query city, return how many retailers cover it.
Loading the problem…