Data Science, Python, Planning, Vacation, Algorithms.
timedelta(days=4) >= start: extended_breaks[-1] = (extended_breaks[-1][0], end) else: extended_breaks.append((start, end)) # Calculate vacation days for each extended break vacation_plans = [] for start, end in extended_breaks: total_days = (end - start).days + 1 vacation_days = sum(1 for d in