According to constraints it can run in 0(nlogn) but it is showing TLE.
here’s my code…
Maximum Circles TLE
rectify these:
- sort according to end = centre+radius and not on radius.
- the start of circle should be >= end of current circle (to be included)
- if the circle cannot be included, then no need to remove the circle!(you initialised start and end with first circle and also started your iteration with first circle which is incorrect!)
https://ide.codingblocks.com/s/251500 refer this if still unable to do!
@mayankA47 can you help me out finding error in this one now i modified my code according to your suggestions
You have to output circles to be removed = n-count
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.