Tightest range around each point
You get a list of closed integer ranges [start, end] with start <= end, and a list of integer points. The size of a range is how many integers it holds, end - start + 1. For each point, return the size of the smallest range that contains it (start <= point <= end), or -1 if no range does. Answers follow the order of points, which may repeat.
Both lists can be long, so checking every range for every point, O(n·q), is too slow: aim for O(n log n + q log q).
Besides the tests, one large input (5,000 ranges and 5,000 points) with a ~450 ms limit (scaled to your device's speed): brute force won't pass.
Examples
tightest_sizes([[1,8],[3,5],[4,4],[7,12]], [4,6,2,10,13])→[1,8,8,6,-1]tightest_sizes([[5,10],[6,7]], [7,8,7])→[2,6,2]tightest_sizes([[1,2],[1,10]], [2,5,1])→[2,10,2]