other.activity_selection

The following implementation assumes that the activities are already sorted according to their finish time

Attributes

start

Functions

print_max_activities(→ None)

Module Contents

other.activity_selection.print_max_activities(start: list[int], finish: list[int]) None
>>> start = [1, 3, 0, 5, 8, 5]
>>> finish = [2, 4, 6, 7, 9, 9]
>>> print_max_activities(start, finish)
The following activities are selected:
0,1,3,4,
other.activity_selection.start = [1, 3, 0, 5, 8, 5]