Decode Strings (LeetCode 394) | Full solution with animations and examples | Study Algorithms

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

КОМЕНТАРІ • 73

  • @ananyadas3257
    @ananyadas3257 Рік тому +15

    There is a comment issue in your pseudocode...The third condition says if there is "[". It should be "]"

    • @nikoo28
      @nikoo28  Рік тому +5

      Thanks for the correction. You are right.

  • @unknownman1
    @unknownman1 Рік тому +10

    You seem like a friend with whom everyone wants to spend more time. Nice explanation btw.

    • @nikoo28
      @nikoo28  Рік тому +2

      this comment is full of warmth..thanks!! 😄

  • @shachisinghal8856
    @shachisinghal8856 11 місяців тому +5

    I smile, when i see that a Q. has been covered by you. Thank you sir.

  • @rhythmbhandari8549
    @rhythmbhandari8549 Рік тому +4

    Your explanations were clear and easy to follow, and the animations and examples you provided really helped solidify my understanding of the problem.

  • @S3aw0lf
    @S3aw0lf 10 місяців тому +1

    After watching the video I had to work on it myself and i finally figured the code. Thanx for the video

  • @shwetagupta8721
    @shwetagupta8721 10 місяців тому +1

    wow nikhil, you explained so well, far better than many of the paid courses, loved your teaching skills.

  • @shubhammanecr7
    @shubhammanecr7 10 місяців тому +3

    Commendable explanation sir!! I just can say one line - Why fear when Nikhil Lohia is here.

  • @priyapriyamadhuri6546
    @priyapriyamadhuri6546 2 місяці тому +1

    Hi nikhil sir, whenever i was searching for any coding questions if you're video is available for a particular question that time i felt so happy , because your videos are really "worth varma worth"😁😁

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

    you are my new fav instructor after sumeet malik, keep making more videos regularly!
    thanks alot.

    • @nikoo28
      @nikoo28  Рік тому +1

      so happy you feel this way

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

    I am a big fan of your teaching Skills

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

    Hey Nikhil, Thank you Man, You explain things in very easy way, keep it up

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

    Your logic explaination is best , keep making such videos :)

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

      trying my best everyday :)

  • @pratibhaverma2063
    @pratibhaverma2063 11 місяців тому +1

    Thank you sir.Very handy approch and explanation.

    • @nikoo28
      @nikoo28  10 місяців тому

      You are welcome

  • @motivationalquotes8545
    @motivationalquotes8545 Рік тому +2

    Very well explained I don't understand why their is less like to video

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

      i dunno either 😂

  • @prateeksharma1047
    @prateeksharma1047 Місяць тому

    Anybody trying to understand `k = (k * 10) + (c - '0');`. Suppose there is a string like 54[a], we will need to create the number 54 from chars 5 and 4. So the equation helps in creating the correct number.

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

    this man is a goat

  • @anushkakhandelwal-s4c
    @anushkakhandelwal-s4c Рік тому

    You were phenomenal. Hats off sirrr!!!

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

      thanks for your kind words

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

    What an amazing explanation sir, thank you so much ❤️

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

    such a clean explanation .............thanku sir❤❤

  • @TalhaTabrez7
    @TalhaTabrez7 10 місяців тому

    keep up the good work!!

  • @shaiksameer9659
    @shaiksameer9659 3 місяці тому +1

    Your explanation is so clear that I have no need to watch another video on this problem. However Nikhil ,how to solve if the number is more than 9 i..e it may be more than 1 character to ad to the number stack ?

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

    thank you sir your explanation is great 🔥 🔥

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

    thank u so so much for the explanation

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

    Brilliant and Intuitve.

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

    Very good explanation..

  • @subee128
    @subee128 11 місяців тому +1

    Thank you

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

    Your videos are awesome 🔥

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

    nice explanation!

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

    great explanation :)

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

    best explanations

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

      Keep watching

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

    do we need 2 stacks?

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

    Hi! Congrats for your solution! I am struggling to understand this bit of code k = (k * 10) + (c - '0') I print line by line with SYSO but I'm still no able to get it. When printing I get the following :
    when k = 1
    (k * 10): 10
    (c - '0'): 1
    this is k: 1
    Why k = (k * 10) + (c - '0') ends up with 1? As (k * 10) = 10 and (c - '0')= 1 why k is not 11?
    Could you please kindly clarify it?

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

      The value of k = 0, not 1. :)
      Also when we push in the stack, once again we change it to 0.

  • @thanhnguyenduy78
    @thanhnguyenduy78 Рік тому +1

    nice!!!!!!!!!

  • @phucpt2k
    @phucpt2k Рік тому +1

    This solution doesn't work if the integer has more than one digit. e.g: 11[ab2[c]de].

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

      It will work..for your test case the output will be
      abccdeabccdeabccdeabccdeabccdeabccdeabccdeabccdeabccdeabccdeabccde

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

      it doesn't work for me as well.

  • @dinnydinesh-b5w
    @dinnydinesh-b5w Рік тому

    you are osm thank you

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

    i wish there was explantion of actual code also..

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

    how to handle multidigit number?

    • @nikoo28
      @nikoo28  11 місяців тому +1

      the solution handles a multi-digit number, check the github link in description :)

  • @11shivamAhir00
    @11shivamAhir00 Рік тому

    thanks sir

  • @sakibx0218
    @sakibx0218 7 місяців тому

    Why we need to add another stack. Since get got first bracket that means if you say stack.peek() you will get the value. Its just waste of memory

    • @nikoo28
      @nikoo28  7 місяців тому

      The space complexity still remains the same O(n)

  • @Abhaykumar-lw7nr
    @Abhaykumar-lw7nr Місяць тому

    third condition will not right instead of "[" '']"

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

    can you do it using 1 stack!

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

      The solution here is more intutive. I would prefer using 2 stacks.

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

    Abhi awaj bahut slow aaa rahi

  • @ridj41
    @ridj41 5 місяців тому

    the code is very complex and is not easy to understand after watching this video tbh, might have made the soln just like the code

  • @kuldeepdiwakar1506
    @kuldeepdiwakar1506 11 місяців тому +4

    Explanation is too simple

  • @abhishekthakur7578
    @abhishekthakur7578 Рік тому +2

    bhai isse accha toh mike mat he laga

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

      Fixed those issues in my latest videos…thanks for the feedback :)

  • @ArunKumar-yq9rs
    @ArunKumar-yq9rs 4 місяці тому

    100[leetcode] what will this give ;)0)

  • @tech-red24
    @tech-red24 8 місяців тому

    bha sound quality bhtttttttttttttttttttttttttt hi gandiiii h ...mic cgange kro phle to aap

  • @pradyumnakubear8561
    @pradyumnakubear8561 Місяць тому

    Lajawaab

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

    Bro try to speak loudly

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

      check my latest videos, if you still find the issue

  • @avinashmv9686894578
    @avinashmv9686894578 4 місяці тому

    Easy to understand. Thank you.

  • @arpanchakraborty9874
    @arpanchakraborty9874 4 місяці тому

    Thank you