I can’t understand that what and how , i have to calculate the output.
Activity selection problem
- Sort the activities according to their finishing time
- Select the first activity from the sorted array and increment count
- Do following for remaining activities in the sorted array.
…….a) If the start time of this activity is greater than or equal to the finish time of previously selected activity then select this activity and increment count.