Gas Station | LeetCode 134 | C++, Java, Python

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • LeetCode Solutions: • LeetCode Solutions | L...
    Github Link: github.com/Kno...
    *** Best Books For Data Structures & Algorithms for Interviews:*********
    1. Cracking the Coding Interview: amzn.to/2WeO3eO
    2. Cracking the Coding Interview Paperback: amzn.to/3aSSe3Q
    3. Coding Interview Questions - Narasimha Karumanchi: amzn.to/3cYqjkV
    4. Data Structures and Algorithms Made Easy - N. Karumanchi: amzn.to/2U8FrDt
    5. Data Structures & Algorithms made Easy in Java - N. Karumanchi: amzn.to/2U0qZgY
    6. Introduction to Algorithms - CLR - Cormen, Leiserson, Rivest: amzn.to/2Wdp8rZ
    *****************************************************************************
    September LeetCoding Challenge | Problem 23 | Gas Station | 23 September,
    Facebook Coding Interview question,
    google coding interview question,
    leetcode,
    Gas Station,
    Gas Station c++,
    Gas Station Java,
    Gas Station python,
    Gas Station solution,
    134. Gas Station,
    #CodingInterview #LeetCode #Google #Amazon #GasStation

КОМЕНТАРІ • 55

  • @KamleshSharma-si2rq
    @KamleshSharma-si2rq 4 роки тому +11

    your are the only one who gives proper explanation of this question...Thank you.

  • @jimwoodward7293
    @jimwoodward7293 4 роки тому +12

    Your in depth explanations are outstanding!! Thank you.

  • @sahilanower9189
    @sahilanower9189 2 роки тому +5

    This mathematical explanation of the intuition behind this O(N) approach was lacking in every video I saw! Now I get it

  • @a7medk7alid7
    @a7medk7alid7 3 роки тому +2

    I would like to thank you for your straightforward explanation videos. I am a junior student in computer engineering and your simple way of explaining tough concepts has helped me to strengthen my ability to think better in problem-solving. Moreover, I have learned much of Java and Python syntax from your videos. Thanks for your efforts, and we are waiting for more leetcode challenges

    • @KnowledgeCenter
      @KnowledgeCenter  3 роки тому +1

      Thanks a lot for the compliment. All the Best.

  • @richakhurana5372
    @richakhurana5372 4 роки тому +4

    Thank you sir for the video. The way you explain a problem, nobody can beat that! :D

  • @samartajshaikh2601
    @samartajshaikh2601 4 роки тому +2

    thanks for this much detailed explanation, it indeed cleared all my doubts...

  • @SHIVAMTIWARI-zu4ht
    @SHIVAMTIWARI-zu4ht Рік тому

    It was amazing explanation. I was having doubt why we r not checking complete circle back to start to know whether its valid or not. The doubt got crystal clear after watching this. Thanks alot.

  • @vivek.tiwary
    @vivek.tiwary 2 роки тому +1

    Best explanation , thank you for this video. 👌👌👍👍👍👍

  • @arpanbanejee5143
    @arpanbanejee5143 2 роки тому

    Thanks for the awesome explanation! I got the intuition from your video! Before this I was struggling to get the proper intuition.

  • @marimyacout2076
    @marimyacout2076 6 місяців тому

    very clear explanation ,thank you very much

  • @anshulraina1819
    @anshulraina1819 3 місяці тому

    wow the proof made everything clear. THANK YOU

  • @ChandraShekhar-by3cd
    @ChandraShekhar-by3cd 2 роки тому +2

    Great Explanation Sir! Pls keep uploading more videos.

  • @paragroy5359
    @paragroy5359 3 роки тому +2

    Pretty nice explanation sir.......

  • @Rounak-qu4ml
    @Rounak-qu4ml 5 місяців тому

    Any video was not explain why we were not checking from the front again. Thanks for the help!

  • @pranjalsharma499
    @pranjalsharma499 3 роки тому +1

    Very good Explanation, Thanks Sir

  • @HighCaliber20
    @HighCaliber20 2 роки тому +1

    Thanks, Your explanation style is fantastic ..make more videos releted this type of questions .

  • @gauravshukla6675
    @gauravshukla6675 3 роки тому +1

    Fabulous video .....thanks
    please continue this great work by explaining more interview problems :)

  • @Ty1er
    @Ty1er 3 роки тому +1

    thanks a lot
    great content

  • @manisha4314
    @manisha4314 4 роки тому +1

    Great explanation... Thank you

  • @shahidul2k9
    @shahidul2k9 2 роки тому +1

    cogently explained :)

  • @rohitgupta7037
    @rohitgupta7037 3 роки тому

    Thank you so much for such a great explanation !!!

  • @nknidhi321
    @nknidhi321 3 роки тому +1

    Thank a ton..❤️

  • @testshar2117
    @testshar2117 3 роки тому +12

    14:20 -- The moment you started x, y ,z it seems you hurried towards explaining. Clearly more clarity was required while putting the equations. How is X+Y+Z >=0. Clearly the way you showed it looked like X, Y and Z are distances but you started comparing those with fuel. You never mentioned this. Instead i was forced to stop and listen again and again to make sense of it. Seems you just hurried without thinking that someone else might get a disconnect there.

    • @tejasjoshi1907
      @tejasjoshi1907 3 роки тому +1

      I too got disconnected from there then finally I moved to the code and boom🤣 it wass easyyyyy

  • @code4logics
    @code4logics 8 місяців тому

    amazing

  • @bruriahassidim8369
    @bruriahassidim8369 3 роки тому +1

    Thank you

    • @KnowledgeCenter
      @KnowledgeCenter  3 роки тому

      Welcome

    • @sandeshsinha9174
      @sandeshsinha9174 Рік тому

      This problem is so hard that I had to pass 23 gases while trying to solve this.
      Because of this, forget about the problem but I was feeling that my body had became a gas station.
      Leetcode please block such hard questions and save air pollution. Thank you!

  • @aashishomre1624
    @aashishomre1624 2 роки тому

    Well explained sir

  • @testshar2117
    @testshar2117 3 роки тому +2

    How do people expect this to be solved very first time when asked in an interview? This is not test of technical knowledge .. its test of mathematical analysis skills.

    • @dorondavid4698
      @dorondavid4698 3 роки тому +2

      That's the thing, no company expects you to magically know all algorithms and ds...you have to practice, a LOT, so you can recognize the patterns hidden inside questions.
      It's like showing up to a marathon without being in top shape; you won't make it (or with some luck you might barely, haha).

  • @Im-gl2xj
    @Im-gl2xj Рік тому

    can someone explain how the part from 13:40 to 17:00 shows that it arrives back at the starting point?

  • @danianiazi8229
    @danianiazi8229 Рік тому

    what the pupose of total surplus?

  • @vaibhavmalik6490
    @vaibhavmalik6490 4 роки тому +1

    🔥🔥

  • @sachinshajan8066
    @sachinshajan8066 4 роки тому +1

    Please put netflix interview question

  • @sheikhmkrifat7749
    @sheikhmkrifat7749 2 місяці тому

    I think you have to work on your English

  • @adityaanand6910
    @adityaanand6910 3 роки тому

    bekar