It wont handle cases where 2 circles contact point is outside the rectangle, Even though circles touch the rectangle side. circle(1|49 35) circle(49|1| 35) rectangle(0|0 15 15)
Bhaiya yesterday was gfg contest and it's q2 says that u have to find the largest subarray whose some is equal to its length. And I am not getting that how can we solve it in O(N) bcoz we to check at each i , all the various length. Mens sum -1 length, sum-2 length is present in the map or not. Plz see that question one time.
It wouldn't matter because when you find the minX, minY, maxX, maxY for such group of circles, it wouldn't satisfy the criteria of any of the 4 barriers.
@@codingmohan I think it can satisfy the condition. Consider a circle with center way above rectangle. The radius may be large enough so that the left end may be less than 0 and the right end may be greater than X. This will satisfy the horizontal line condition even though the circle doesn't even intersect the rectangle.
Its not handling case when circle is outside the rectangle , can u send the updated code which handles that also
We can handle the edge case when the circle is completely outside the rectangle by simply excluding those circles from consideration.
It wont handle cases where 2 circles contact point is outside the rectangle, Even though circles touch the rectangle side.
circle(1|49 35)
circle(49|1| 35)
rectangle(0|0 15 15)
Thanks a lot ❤😊
really good explanation! thanks a lot
Now its giving wrong answer ig guess the testcases are updated, can u send the updated code by using dsu
Bhaiya yesterday was gfg contest and it's q2 says that u have to find the largest subarray whose some is equal to its length.
And I am not getting that how can we solve it in O(N) bcoz we to check at each i , all the various length. Mens sum -1 length, sum-2 length is present in the map or not.
Plz see that question one time.
But ab aa gya smj bhaiya.
what is entire circle is outside the rectangle?
It wouldn't matter because when you find the minX, minY, maxX, maxY for such group of circles, it wouldn't satisfy the criteria of any of the 4 barriers.
@@codingmohan I think it can satisfy the condition. Consider a circle with center way above rectangle. The radius may be large enough so that the left end may be less than 0 and the right end may be greater than X. This will satisfy the horizontal line condition even though the circle doesn't even intersect the rectangle.
@@aadishjain2378yaa thats what , @codingmohan can u check this
❤