Solving Uber Advanced Frontend Interview Question | Overlapping Circles

Поділитися
Вставка
  • Опубліковано 17 гру 2024

КОМЕНТАРІ •

  • @DevtoolsTech
    @DevtoolsTech  2 дні тому +1

    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

  • @perfect-peace-steph
    @perfect-peace-steph 7 годин тому

    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

    • @DevtoolsTech
      @DevtoolsTech  Годину тому

      Valid suggestions! Thanks for sharing. 🙏🏻

  • @subhamjena8854
    @subhamjena8854 2 дні тому

    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.

    • @DevtoolsTech
      @DevtoolsTech  2 дні тому

      Hey, good catch! Just noticed. We should add rightCircleRadius to find the right Center! 🙏🏻

  • @shubhamthaker9380
    @shubhamthaker9380 2 дні тому

    a pretty awesome question with a nice approach followed , thankyou ! wish i could apply this much of logic in my journey working towards it.

    • @DevtoolsTech
      @DevtoolsTech  2 дні тому

      Thanks! It is a matter of time and practice! Keep at it. 🙌🏼

  • @903siddhu
    @903siddhu 2 дні тому

    Awesome bro

  • @ShadabMehdi
    @ShadabMehdi 2 дні тому

    BRO!!! What was that at 43:35?? Did you seriously copy paste "L" ?? LMAO. Jokes aside, amazing video. Kudos.

    • @DevtoolsTech
      @DevtoolsTech  2 дні тому

      Hahaha I know. I forgot to edit it. It should be rightCircleRadius there. 😅

  • @luxurymusic1051
    @luxurymusic1051 2 дні тому

    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

    • @DevtoolsTech
      @DevtoolsTech  2 дні тому +2

      It can't be done in 30-40 mins. Minimum 60 mins. Idea is not to attempt it fully but show the right approach.

  • @eshw23
    @eshw23 5 годин тому

    What? Uber doesnt ask front end questions, dont they just do DSAs?

    • @DevtoolsTech
      @DevtoolsTech  Годину тому

      Uber asks both DSA and FE questions.