Hello sir/ma’am, I wrote the code for this question. But still some test cases are not passing. Please tell me what changes do i have to make in this. https://ide.codingblocks.com/s/197825
Greedy- Max Circles
Hi,
In your code l represents the leftmost point of circle and r represents rightmost point of the circle. You should check the number of circles having leftmost point greater than the rightmost point of previous circle. at the end just subtract it from the total number of circles to get minimum circle which we should remove.
Now,try to solve.
Okay, got it sir. Thank you!!