At @44:11 we need to add rightCircleRadius to find the rightCenter. It was a miss. Question link: devtools.tech/questions/s/how-to-detect-overlapping-circles-in-react-js-uber-frontend-interview-question---qid---ixSxPTedmz1CyVZSab1N Book session with us: topmate.io/yomeshgupta
Clearly explained solution Yomesh! very helpful. In addition to the observations you made at the end, we can also further expand the solution for the following: 1) If the color of the second circle has changed, it should be reset if we're drawing another circle at a distance. 2) The latest drawn circle should be on top position
Pretty good solution Yomesh! Have seen similar solutions on other interviews but this was pretty neatly explained and I really liked the code calrity. Just one more bug I noticed(correct me if wrong), The code was passing for the example cases but on 44:11 line-35,36 you didn't edit the rightCircleRadius for rightCenter so some cases where the circle sizes are not similar and the right circle is close to leftCircle and the rightRadius is smaller, then the those cases will fail, as the rightCenter will shift by √2*(leftRadius-rightRadius). The circles will be overlapping but the color condition won't be met.
At @44:11 we need to add rightCircleRadius to find the rightCenter. It was a miss.
Question link: devtools.tech/questions/s/how-to-detect-overlapping-circles-in-react-js-uber-frontend-interview-question---qid---ixSxPTedmz1CyVZSab1N
Book session with us: topmate.io/yomeshgupta
Clearly explained solution Yomesh! very helpful.
In addition to the observations you made at the end, we can also further expand the solution for the following:
1) If the color of the second circle has changed, it should be reset if we're drawing another circle at a distance.
2) The latest drawn circle should be on top position
Valid suggestions! Thanks for sharing. 🙏🏻
Pretty good solution Yomesh! Have seen similar solutions on other interviews but this was pretty neatly explained and I really liked the code calrity.
Just one more bug I noticed(correct me if wrong), The code was passing for the example cases but on 44:11 line-35,36 you didn't edit the rightCircleRadius for rightCenter so some cases where the circle sizes are not similar and the right circle is close to leftCircle and the rightRadius is smaller, then the those cases will fail, as the rightCenter will shift by √2*(leftRadius-rightRadius). The circles will be overlapping but the color condition won't be met.
Hey, good catch! Just noticed. We should add rightCircleRadius to find the right Center! 🙏🏻
a pretty awesome question with a nice approach followed , thankyou ! wish i could apply this much of logic in my journey working towards it.
Thanks! It is a matter of time and practice! Keep at it. 🙌🏼
Awesome bro
BRO!!! What was that at 43:35?? Did you seriously copy paste "L" ?? LMAO. Jokes aside, amazing video. Kudos.
Hahaha I know. I forgot to edit it. It should be rightCircleRadius there. 😅
even u coded it in good amount of time , with a pre solution in mind, how can this be done realtime within 30-40 min with edgecases
It can't be done in 30-40 mins. Minimum 60 mins. Idea is not to attempt it fully but show the right approach.
What? Uber doesnt ask front end questions, dont they just do DSAs?
Uber asks both DSA and FE questions.