https://ide.codingblocks.com/s/265812, what is the flow in the code?
Greedy - Maximum Circles, Run Error
You can follow this approach
Take in input the centers and radii of the circles. Find the leftmost and rightmost points of these circles by
left = c[i] - r[i];
right = c[i] + r[i];
Store these left and right as a pair and sort this array of pairs in increasing order of right. Then run the greedy algo.
You can refer this code https://ide.codingblocks.com/s/265900 and crosscheck your approach
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.