please explain the question in well mannered way as i fail to understand in the question as well as test cases i.e which points are valid for a valid bridge and how?
Question not understandable
@mohitbiddu1
taking the sample test case:-
4
2 5 8 10
6 4 1 2
here, all possible bridiges are (2,6) (5,4) (8,1) (10,2).
consider (i,j) as i present on different line than j.
refer to this image

so here these 2 are maximum number of bridges possible. Others will cross and cause less bridges to be made.
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.
sorry but my question get stuck at 20 points.
please check my code whats wrong in it?