Activity selection problem

getting test cases wrong

@Rakshitgarg99
hello Rakshit,
you logic is bit wrong here u are comparing times of two consecutive activities but actually u should compare ur current activity with the last activity the u have considered in ur answer.

check ur updated code here -> https://ide.codingblocks.com/s/192690
prev variable is holding last activity that is considered in answer

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.