Its giving wrong answer i cant find why? ACTIVITY SELECTION PROBLEM

https://ide.codingblocks.com/s/70669

Wrong test case
1
3
5 6
1 4
2 5

You sort the end array
bt forget to sort start array according to end array

Example
Given two Activities
1 5
2 3

After your sorting activities
1 3
2 5
Bt after correct sorting
2 3
1 5
Hit like if u get it

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.