I am not able to solve this problem and not able to find logic behind this question.
Concept related Isuue
But i don’t know how is it woking?
n bridges and u need to tell maximum number of non intersecting beidges .

for ex-> here we have 4 bridges
(2,6) , (5,4) , (8,1) ,(10,2)
maximum non intersecting bridges are ->2
i,e (8,1) and (10,2) they will not cross each other.
so first we put these bridges in vector and sort them in ascending order.
after that we will use lis dp.
where dp[i] => maximum non intersecting bridge we can get with bridge at index i as the last bridge. (the recurrence is same as lis, if u r not getting then pls solve LIS problem first)
refer this for clarity->
how (8,1) and (10,2) are not intersecting??

Hello can you call me??
…
sry i dont take doubt over calls.
if u have any doubt , u can ask me here only
I have to ask only few things related to competitive coding … please help me
you can ask here only. . .
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.