Activity Selection Problems

didn’t understand this question

@ayu2321 You are given n activities with start and end time, now you need to select the maximum number of activities from them, (you can start another activity only after completing the first activity).
Eg.
4
1 2
5 10
3 4
7 10
Now you can choose 3 activities in the example : 1-2 ,3-4(end time of last and start time of this do not intersect we can choose it), 5 -10 or 7-10 . (we cannot choose both as there time intersects)
Hint:(sort the activities according to end time).
If this solves your doubt mark it as resolved.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.