I know the approach, that we need to take the starting and end points of each circle and calculate total number of non overlapping circles and then subtract it with total number of circles. But in my case what i have calculated total number of overlapping circles just, and it isn’t coming out to be correct. Moreover can how can i optimize it, as it is using 2 nested loops.
Here is the code: