Maximum Circles(Greedy approach)

One of the test cases is failing.i can not understand the https://ide.codingblocks.com/s/103796

Hello @vrindabansal05,

This is the solution of that testcase:
if(p[i].first>=fin)

Actually, for the question they are considering two circles intersecting at one point as non-overlapping (considering second of first circle is at left of second of second circle.)

See the second diagram in the following figure:

Hope, this would help.
Give a like, if you are satisfied.

2 Likes