You are given an integer n representing the number of positions on a line, indexed from n brightness representing the minimum number of positions that must be illuminated.
Placing a light bulb at position p illuminates position p as well as its adjacent positions p p
You are also given a intervals, where intervals[i] = [start_i, end_i] represents an inclusive active time interval start_i, end_i end_i start_i
Each light bulb consumes intervals.
Return the minimum total energy required to illuminate at least brightness positions across the entire active time.
Constraints:
n
brightness n
intervals.length
intervals[i] == [start_i, end_i]
start_i end_i
You are given an integer n representing the number of positions on a line, indexed from n brightness representing the minimum number of positions that must be illuminated.
Placing a light bulb at position p illuminates position p as well as its adjacent positions p p
You are also given a intervals, where intervals[i] = [start_i, end_i] represents an inclusive active time interval start_i, end_i end_i start_i
Each light bulb consumes intervals.
Return the minimum total energy required to illuminate at least brightness positions across the entire active time.
Constraints:
n
brightness n
intervals.length
intervals[i] == [start_i, end_i]
start_i end_i