Company: Capital One_3july
Difficulty: medium
Most Illuminated Point Problem Description There are some lamps placed on a coordinate line. Each of these lamps illuminates some space around it within a given radius. In other words, you are given a two-dimensional array lamps , where lamps[i] contains information about the i th lamp. lamps[i][0] is an integer representing the lamp's coordinate, and lamps[i][1] is a positive integer representing the effective radius of the i th lamp. That means that the i th lamp illuminates everything in a range from lamps[i][0] - lamps[i][1] to lamps[i][0] + lamps[i][1] inclusive. Your task is to find the coordinate of the point that is illuminated by the highest number of lamps. In case of a tie, return the point among them with the minimal possible coordinate. Examples Example 1: Input: lamps = [[-2, 3], [2, 1], [2, 1]] Output: 1 Explanation: The first lamp illuminates everything in range [-2 - 3, -2 + 3] = [-5, 1] . The second lamp illuminates everything in range [2 - 1, 2 + 1] = [1, 3] . The th