Maximum Circles

Why I am getting wrong output ?

@vaishnavtannu
correct the else condition in your comparator function, it should be < instead of ==
Let suppose you are selecting the maximum number of circles which you we can take.
So, During selecting the circles, we should check our current circle coordinates with last selected circle coodinates not with the just previous one (i.e. not i and i+1).
for eg take a case when there are 4 circles and each one of them is overlapping with the next one. Then your code will give output as 4 (like in sample test case).

You can have a look at my code if you are confused in how to implement that https://ide.codingblocks.com/s/249771

Feel free to ask.
Also mark this doubt as resolved if you are able to solve it now.