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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started