0683. K Empty Slots
Description
**Input:** bulbs = [1,3,2], k = 1
**Output:** 2
**Explanation:**
On the first day: bulbs[0] = 1, first bulb is turned on: [1,0,0]
On the second day: bulbs[1] = 3, third bulb is turned on: [1,0,1]
On the third day: bulbs[2] = 2, second bulb is turned on: [1,1,1]
We return 2 because on the second day, there were two on bulbs with one off bulb between them.**Input:** bulbs = [1,2,3], k = 1
**Output:** -1ac
Last updated