Question: C code please. Please provide correct code with taking the given inputs and get the given output from the image. If your code executes in

C code please.
Please provide correct code with taking the given inputs and get the given output from the image.
If your code executes in the same way with the given inputs and gives the correct outputs, I will Upvote for sure. Or else I will downvote... Thank You....
Write a C program to solve activity selection problem using finishing time strategy. Collect the required input from the user and schedule maximum number of activities without clashing. Example 1 : Consider the following 3 activities sorted by finish time. start() = {10, 12, 20); finish[] = {20, 25, 30); A person can perform at most two (k)activities: {0, 2) Note: (These are indexes in start[] Example 2 : Consider the following 6 activities sorted by by finish time. start[] = {1, 3, 6, 5, 8, 5); finish[] = {2, 4, 7, 7, 9, 9}; A person can perform at most four(k) activities: {0, 1, 2, 4} Note: Read number of activities given, how many activities (k) to be selected at most, followed by start and finish times in arrays from the user. Print the solution. For example: Input Result 3 0 2 2. 10 12 20 20 25 30 6 0 1 2 4 4 1 3 6 5 85 2 4 7 7 9 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
