Maximum Circles Problems

COde not working
my code:

Hello @Prankur-Tewari-2574939259288733,

  1. Your code will fail for greater values of c and r.
    Example:
    c=10^9 and r=10^9
    value of val will be greater than the range of int.
    Solution:
    Make all the variables long even the elements inside the pairs.

  2. Comparator function is incomplete.

Refer to the following code for your mistakes:

Let me know if you face any issue.
Hope, this would help.
Give a like if you are satisfied.

1 Like

Hello @Prankur-Tewari-2574939259288733,

Please, mark it as resolved if you haven’t.