Minimum days for bouquets
Your task
You have a garden where bloom[i] is the day the i-th flower blooms. To make a bouquet you need k adjacent (consecutive in the array) bloomed flowers; you want to make m bouquets. Return the minimum number of days to wait so you can make m bouquets, or -1 if it is impossible. 1 <= len(bloom) <= 1e5.
Examples
min_days_bouquets(bloom: list[int], m: int, k: int) -> intExample 1
Input
min_days_bouquets([1, 10, 3, 10, 2], 3, 1)Output
3