bulbs array into a days array where days[i] is the day the bulb at position i+1 turns on.left and right to represent the window's boundaries, with right = left + k + 1.days array using a variable i.days[i] is greater than both days[left] and days[right], continue to the next iteration.i equals right, update the answer with max(days[left], days[right]) as a potential answer.days[i] is less than or equal to days[left] or days[right], move left to i and right to left + k + 1.right is out of bounds.-1.