683-K-Empty-Slots
Fri 14 November 2025
https://leetcode.com/problems/k-empty-slots
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
def kEmptySlots(self, bulbs: List[int], k: int) -> int:
n = len(bulbs)
ans = math.inf
# day[i] := the day when bulbs[i] is turned on
day = [0] * n
for …Category: leetcode
Read More