Candy | Leetcode June Challenge | Leetcode 135 | Approach + Code | C++ | Python | Hindi

Sdílet
Vložit
  • čas přidán 26. 06. 2021
  • C++ Code Link : github.com/Ayu-99/Data-Struct...
    Python Code Link: github.com/Ayu-99/Data-Struct...
    Please like, share and subscribe if you found the video useful. Feel free to ask in comments section if you have any doubts. :)
    #leetcode
    #leetcodeJuneChallenge
    #interviewpreparation
    Candy solution
    Candy Leetcode
    Candy C++
    Candy C++ Hindi
    Candy Hindi
    Checkout the series: 🔥🔥🔥
    👉 Recursion : • Recursion
    👉 Stack and Queue : • Stack And Queue
    👉 Greedy : • Greedy
    👉 Leetcode contests : • Leetcode contests
    👉 Leetcode June Challenge : • Leetcode June Challenge
    LIKE | SHARE | SUBSCRIBE 🔥🔥😊

Komentáře • 46

  • @yugalvashishth8544
    @yugalvashishth8544 Před rokem +1

    Your voice is so pleasing to ears

  • @19abhishekgupt70
    @19abhishekgupt70 Před 2 lety +1

    Thank you very much ma'am i wish I could show you my number of attempts 😅but one more thing i only took a basic idea about this problem although the category of this question is hard according to leetcode but after watching your explanation till 4 to 5 min i got the idea and solved it easily 😅 thanks 🎉

  • @amanpreetsinghsetia1524
    @amanpreetsinghsetia1524 Před 2 lety +1

    Nice Explanation!

  • @aniketbhura6131
    @aniketbhura6131 Před 2 lety

    like going for least rating .. give them 1 candy then go to rating that is more than previous and give them max (left and right) +1 . and so on?

  • @santoshpathak8201
    @santoshpathak8201 Před 10 měsíci

    explained at its best ... love it

  • @aniketbhura6131
    @aniketbhura6131 Před 2 lety

    this can also be done in a single traversal ?

  • @desihiphop4998
    @desihiphop4998 Před 2 lety

    Thanks di bilkul clear hogya !!!

  • @ishangujarathi10
    @ishangujarathi10 Před 10 měsíci

    greatt explanation of leetcode hard question!!

  • @aniruddhkarekar2818
    @aniruddhkarekar2818 Před 11 měsíci +1

    thanks didi

  • @tusharjeena7081
    @tusharjeena7081 Před rokem

    Mam you are so great ,the way you are teaching is far better than the college professor
    can you please tell me from which college you are

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 2 měsíci

      Thank you Tushar :)
      I’m from Guru Nanak Dev Engineering college

  • @filmreviewer2089
    @filmreviewer2089 Před 3 lety +1

    Mam please make a video on Which Subjects we should bstudy for placement.
    I am in 2nd year in btech IT.

  • @divashgupta5871
    @divashgupta5871 Před rokem

    Whats the need of candy condition?

  • @puneetbhandari1134
    @puneetbhandari1134 Před 2 měsíci

    why their is a candy condition .....why you comparing candy ??

  • @MadhavGupta-fi2tu
    @MadhavGupta-fi2tu Před 9 měsíci

    kya pyaari awaz h

  • @rishavagarwal6531
    @rishavagarwal6531 Před 3 lety

    I have a doubt!.. You are doing 2 traversal.. First from left to right and then from right to left... Can we do in a single traversal? (That is only from left right and comparing neighbors)

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 3 lety

      no, it won't work using single traversal as the value depends on neighbors and those value can change after. Try to do it with test case, it will be more clear.

    • @sahilverma4142
      @sahilverma4142 Před 3 lety

      First of all it doesn't work. But why are u thinking for single traversal. The tc will remains same in both cases.

    • @rishavagarwal6531
      @rishavagarwal6531 Před 3 lety

      We all think that single or two traversal time complexity remains same but in reality two traversals takes more time and it's so small that we doesn't count it in theory!.. It has some delay!.. Secondly I currently was interviewed in Amazon... They were asking everything in single traversal though 2 traversals also take same time

    • @rishavagarwal6531
      @rishavagarwal6531 Před 3 lety

      And they only told me the reason!.. Never think 2 traversals and single traversal takes same time!.. In theory its okay but in practical life it's not

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 3 lety

      @@rishavagarwal6531 did they ask you the same question?

  • @ekanshsharma1309
    @ekanshsharma1309 Před rokem

    didi ye approach click kese kari 🥲???

  • @rishavagarwal6531
    @rishavagarwal6531 Před 3 lety +1

    Are u a student or doing job?

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 3 lety +1

      I am in final year doing internship

    • @rishavagarwal6531
      @rishavagarwal6531 Před 3 lety

      Which company if it's comfortable to ask?

    • @AyushiSharmaDSA
      @AyushiSharmaDSA  Před 3 lety +2

      @@rishavagarwal6531 you can connect with me on LinkedIn : www.linkedin.com/in/ayushi-sharma-8a285a185/