What is wrong in this code

@Adityakumar3112
hello aditya,
a) increase ur array size ( 50 is not sufficient size to check value of n and decide size accordingly)
b) sort ur array on the basis of ending time (u are sorting it on basis of starting time)

so how can i sort array on basis of ending time

@Adityakumar3112
define custom comparator and pass it as third argument in ur sort function

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.