Robot Bounded In Circle 🔥| Leetcode 1041 | Math | String

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025

ความคิดเห็น • 62

  • @shalinigupta3298
    @shalinigupta3298 2 ปีที่แล้ว +1

    your way to write code is best☺

  • @ChandraShekhar-by3cd
    @ChandraShekhar-by3cd 3 ปีที่แล้ว +3

    Thanks a lot for the great explanation with visualization. I see very less in other channels. Keep it up!

  • @rohithmsr2756
    @rohithmsr2756 3 ปีที่แล้ว +2

    Could you make a live coding session for any of the leetcode daily challenge question? Want to know how you arrive at the solution and code it. That wud be helpful for my coding interviews.

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 ปีที่แล้ว +2

      Sure Rohith, just don't have that much bandwidth most of the time on weekdays . I will plan this for weekend. :)

  • @ahmadaskar3360
    @ahmadaskar3360 8 หลายเดือนก่อน +1

    why exactly is any direction other than north, is going to return false

    • @eshikarya
      @eshikarya 4 หลายเดือนก่อน

      I think I understand why we take "NOT NORTH as a condition" --->
      Say for example you're starting your journey in Bangalore [we'll take bangalore as the origin: (0,0)]... You want to travel all of India and then return back home to Bangalore.
      So let's suppose you drove to north india, then you took a right travelled to east india and now you're facing in the east direction (eg. you're in east india and you're facing towards japan). Now to come back to bangalore you will have to travel towards your right side.
      WHEN YOU ARE FACING EAST:
      if you travel straight ahead you will be moving towards Japan
      If you travel left, you will be travelling towards Nepal
      If you travel backwards, you will be travelling towards Gujarat
      but if you travel towards right then you'll be coming back to bangalore
      so all in all it means if you started from origin while facing northwards and you want to come back to origin you can never do that if you still keep facing north, you'll have to turn in some way to come back to origin AND if you turn that implies your direction is changing.
      BUT let's suppose you never moved from Bangalore, you just stood at one place and kept changing the side you're facing In this case your coordinates would be constant at (0,0)
      I hope this helps you understand. If not, let me know I'll try and elaborate? :)

  • @dhanashreegodase4445
    @dhanashreegodase4445 2 ปีที่แล้ว

    very intutive! thanks

  • @rajendertanwar1881
    @rajendertanwar1881 3 หลายเดือนก่อน

    Thanks sister, for this best explanation ❤

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 หลายเดือนก่อน

      welcome Rajender, glad it was helpful :)

  • @ankittyagi1178
    @ankittyagi1178 3 ปีที่แล้ว +1

    Doing great job, Just your voice is bit low or may be that is my speaker issue. Please check once :) Thank you

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 ปีที่แล้ว

      Welcome, sure Ankit, I will look into it :)

  • @ritik637
    @ritik637 3 ปีที่แล้ว +1

    Great Explanation

  • @anshul5533
    @anshul5533 3 ปีที่แล้ว

    You are a fan of Lexi Hensler, right? btw awesome vedio😃

  • @PuneetKumar-uq4ru
    @PuneetKumar-uq4ru 3 ปีที่แล้ว

    Finally 😎, waiting since morning

  • @terabaap473
    @terabaap473 3 ปีที่แล้ว

    loved your solution...keep up the good work✨✨✨

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 ปีที่แล้ว

      Thank you Anurag, glad it was helpful :)

  • @rishabhdevbanshi9780
    @rishabhdevbanshi9780 3 ปีที่แล้ว

    Thanks a lot for this great tutorial !

  • @Nishant89-i2z
    @Nishant89-i2z 9 หลายเดือนก่อน

    nice explanation

  • @harshtyagi700
    @harshtyagi700 3 ปีที่แล้ว

    Thanks for making this video

  • @randritasarkar6218
    @randritasarkar6218 3 ปีที่แล้ว

    Great explanation :)

  • @popularedits6984
    @popularedits6984 3 ปีที่แล้ว

    Waiting for this 🎉💜

  • @anonymous13378
    @anonymous13378 3 หลายเดือนก่อน

    from striver sheet i am unable to solve 95% solutions without seeing the solution, what shall i do ??

  • @pranavkumarparihar1397
    @pranavkumarparihar1397 3 ปีที่แล้ว

    Thanks di :)

  • @prateeksharma3698
    @prateeksharma3698 3 ปีที่แล้ว

    Consistency Op 🔥

  • @SuryaChallagali
    @SuryaChallagali 3 ปีที่แล้ว

    How to get internship at big tech companies 😭. Plz do one video plz 🙏

  • @geekyprogrammer9553
    @geekyprogrammer9553 3 ปีที่แล้ว

    this is good

  • @sangammishra3670
    @sangammishra3670 3 ปีที่แล้ว

    why incoming will always be L if not g but it can also be R

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 ปีที่แล้ว +1

      Hi Sangam, I think u are getting confused in ternary operator, it is like incomming == L? Sth happens : sth happens. (It is like if else)

  • @test_yourself
    @test_yourself 3 ปีที่แล้ว

    but di aapne current direction ko "N" define kia hai... so aap S,E,W kese use kr paa rahe ho. S,E,W pehle kai define nhi kie

    • @harshtyagi700
      @harshtyagi700 3 ปีที่แล้ว

      The current direction of the robot's face is North so whenever you encounter any left or right in the instruction string you've to change the direction (which is done in the else part of the loop)otherwise keep on moving in the direction in which you're .
      Now the co-ordinates of x and y would depend on what direction you're moving forward as we have already updated the most recent direction so the co-ordinates would be updated accordingly.

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 ปีที่แล้ว

      Neelesh, please refer Harsh's comment, if you still have any doubts, let me know :)

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 ปีที่แล้ว

      @@harshtyagi700 thanks Harsh for helping out :)

  • @prashantpundir7448
    @prashantpundir7448 3 ปีที่แล้ว

    hlo di i m in 4th sem and i start leetcode daily challange from 1st jan and doing one coding question daily it is enough ?

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 ปีที่แล้ว

      Prashant, I would suggest practice more interview specific questions either from leetcode /interviewbit/ codestudio/gfg

    • @prashantpundir7448
      @prashantpundir7448 3 ปีที่แล้ว

      @@AyushiSharmaDSA then how to manage time i have to cover subjects also

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  3 ปีที่แล้ว +1

      @@prashantpundir7448 just keep few hours of day for coding

    • @prashantpundir7448
      @prashantpundir7448 3 ปีที่แล้ว

      @@AyushiSharmaDSA i recently see your video on coding ninja

  • @SavitarOP
    @SavitarOP 3 ปีที่แล้ว

    OP Solution

  • @digantachaudhuri
    @digantachaudhuri 3 ปีที่แล้ว +1

    Nice explanation Thank You.
    subscriber++;

  • @urvishajain2976
    @urvishajain2976 3 ปีที่แล้ว

    Saviour🙌😟❤️

  • @anuraggoswami3534
    @anuraggoswami3534 3 ปีที่แล้ว

    Done !!!

  • @tusharpandey1838
    @tusharpandey1838 ปีที่แล้ว

    This approach fails if instruction is only GG