First I created an pair of integers to store starting and ending time of activity.Then I sorted them according to starting time i.e. first element.Then I compared second element of each pair with first element of next pair.If I find such pair I will increment counter to count number of activities.
1 Test Case Failed
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.