Doubt regarding edge cases

I tried to solve this problem using greedy, but there are some edge cases that are not getting satisfied in my solution. I am unable to understand what those edge cases are. Can anyone help me. I used the same approach used in BUSY MAN problem, taking those circles which have their ending coordinate greater than the ending coordinate of it’s previous circle. And I am always including the first circle. My code is https://ide.codingblocks.com/s/309843.

@souptiksarkar4572 we must sort such that the circle’s end point are in ascending order!

I got my mistake.Thank you pointing it out.