Question: # Python3 program for activity selection problem. def printMaxActivities(start, finish): n = len(finish) print(Following activities are selected) i = 0 print(i, end=' ') if start[j]

# Python3 program for activity selection problem. def printMaxActivities(start, finish): n = len(finish) print("Following activities are selected") i = 0 print(i, end=' ') if start[j] >= finish[i]: print(j, end=' ') if __name__ == '__main__': start = [] finish = [] # Function call printMaxActivities(start, finish)

I am sharing with you the code of activity selection problem. This time you will code in python. Almost all the code is there only couple of statements missing.

Your task:

a) You will code activity selection problem by inputting your start times equivalent to [1, 5, 8, 6, 10, 7] and finish times equivalent to [3,10,14,5, 7, 12].

b) You should have annotations in the code for getting full points.

c) Take the screen shots of the codes and the outputs and upload as jpeg or pdf here.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!