There is this simple question of CSES sorting and searching. CSES Problem
I figured out the logic to sort by end and just take the maximum possible set formed, basically greedy I have coded this and got all AC but just one RE. I looked up but didn’t found why it got RE. Input length is not an issue. As there is a similar input of that type. My solution
Please point out my mistake as I am not able to figure it out.