I couldnt undernsand what is being said in the ques and how sample test cases output coming? pplz explain
There should be some explanation for the test cases
Hey @pranjalarora98 see this you will understand the entire problem as it’s explained in detail also with the code attached.
Bridge
can this be done if i sort both the arrays
NO, you should sort only based on the x-coordinates of end points
that are identified on the first side, that’s why we have make pair for them. Do dry run for different test cases. You will et the intuition for sure.
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.