how to solve this ques?
Maximum circles(greedy)
hello @tishya_goyal
this problem is a variation of activity selection problem.
for each circle store left and right end of the circle in an array and then apply logic similar to activity selection to find maximum number of non overlapping circles.
let say answer u get from above logic is ans.
print n-ans as ur answer because question asked minimum circle we remove to make other circles non overlapping.
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.