Maximum Circles Approach

How can I approach this problem?

This is simple activity selection problem. Consider, for each circle, its beginning at center - r and ending at c+r. Now greedily select activities by sorting them according to their ending.

So, I didn’t study greedy approach. But, if you give some steps to do, it’ll be helpful

This link should help https://www.geeksforgeeks.org/activity-selection-problem-greedy-algo-1/

I have a doubt. If both circles end are same then how can I sort the two circle?

It doesn’t matter , just sort using ending time , if ending time is same sort using start time. Now the algorithm will automatically pick the best one