You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are given n activities with their start and finish times. Select the maximum number of activities that can be performed by a single person, assuming that a person can only work on a single activity at a time.
while not start_finish[en+1][0] - st >= 0 and en < len(start_finish)-2:
en+=1
print(count)
'''
Tricky corner cases!
The greedy algorithm is good but the thing to remember here is the we have to eliminate overlapping work schedules. Consecutive difference calculation doesn't work!