why is sorting done on basis of 2nd int of pair in solution…?
Doubt in editorial
current activity can be selected if the finish time of previous selected activity is less than or equal to the starting time of current activity.
so we are arranging them according to the ending time