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

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 75

  • @ananyadas3257
    @ananyadas3257 Год назад +17

    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 Год назад +11

    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!! 😄

  • @code_maestro
    @code_maestro Месяц назад +1

    Everytime when I am not able to solve any leetcode question, I will search in your channel only. Your solution and explanation is very clear.

  • @shachisinghal8856
    @shachisinghal8856 Год назад +6

    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 11 месяцев назад +1

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

  • @shwetagupta8721
    @shwetagupta8721 Год назад +1

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

  • @shubhammanecr7
    @shubhammanecr7 Год назад +3

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

    • @nikoo28
      @nikoo28  11 месяцев назад +1

      🤘

  • @priyapriyamadhuri6546
    @priyapriyamadhuri6546 4 месяца назад +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"😁😁

  • @sumatheultimategirl7477
    @sumatheultimategirl7477 Месяц назад

    Explanation is superb 😊😊😊

  • @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

  • @shaiksameer9659
    @shaiksameer9659 5 месяцев назад +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 ?

  • @sonicserenity9498
    @sonicserenity9498 10 месяцев назад

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

  • @pratibhaverma2063
    @pratibhaverma2063 Год назад +1

    Thank you sir.Very handy approch and explanation.

  • @prathameshpawar985
    @prathameshpawar985 Год назад

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

    • @nikoo28
      @nikoo28  Год назад

      trying my best everyday :)

  • @vineetkumar2899
    @vineetkumar2899 Год назад

    I am a big fan of your teaching Skills

  • @motivationalquotes8545
    @motivationalquotes8545 Год назад +2

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

    • @nikoo28
      @nikoo28  Год назад

      i dunno either 😂

  • @gitansh194
    @gitansh194 5 месяцев назад

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

  • @sukanyaghosh24
    @sukanyaghosh24 Год назад

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

  • @TalhaTabrez7
    @TalhaTabrez7 11 месяцев назад

    keep up the good work!!

  • @anushkakhandelwal-s4c
    @anushkakhandelwal-s4c Год назад

    You were phenomenal. Hats off sirrr!!!

    • @nikoo28
      @nikoo28  Год назад

      thanks for your kind words

  • @jatin_9911
    @jatin_9911 4 месяца назад

    thank you sir your explanation is great 🔥 🔥

  • @lalanabiridi8358
    @lalanabiridi8358 Год назад

    this man is a goat

  • @prasannavenkkatesh1192
    @prasannavenkkatesh1192 8 месяцев назад

    do we need 2 stacks?

  • @prateeksharma1047
    @prateeksharma1047 2 месяца назад

    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.

  • @jagan2350
    @jagan2350 Год назад

    Your videos are awesome 🔥

  • @helloworld4788
    @helloworld4788 8 месяцев назад

    thank u so so much for the explanation

  • @iamnoob7593
    @iamnoob7593 Год назад

    Brilliant and Intuitve.

  • @abhaykumarsingh3884
    @abhaykumarsingh3884 8 месяцев назад

    Very good explanation..

  • @navraj1995
    @navraj1995 4 месяца назад

    i wish there was explantion of actual code also..

  • @tusharrastogi7490
    @tusharrastogi7490 2 года назад

    great explanation :)

  • @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.

  • @tanyatanya3100
    @tanyatanya3100 2 года назад

    nice explanation!

  • @subee128
    @subee128 Год назад +1

    Thank you

  • @atharvdeshmukh8192
    @atharvdeshmukh8192 Год назад

    how to handle multidigit number?

    • @nikoo28
      @nikoo28  Год назад +1

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

  • @ousmanbah10
    @ousmanbah10 8 месяцев назад

    best explanations

    • @nikoo28
      @nikoo28  7 месяцев назад

      Keep watching

  • @Abhaykumar-lw7nr
    @Abhaykumar-lw7nr 3 месяца назад

    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.

  • @sakibx0218
    @sakibx0218 9 месяцев назад

    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  9 месяцев назад

      The space complexity still remains the same O(n)

  • @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.

  • @thanhnguyenduy78
    @thanhnguyenduy78 Год назад +1

    nice!!!!!!!!!

  • @dinnydinesh-b5w
    @dinnydinesh-b5w Год назад

    you are osm thank you

  • @11shivamAhir00
    @11shivamAhir00 Год назад

    thanks sir

  • @kuldeepdiwakar1506
    @kuldeepdiwakar1506 Год назад +4

    Explanation is too simple

  • @deepakffyt2844
    @deepakffyt2844 Год назад

    Abhi awaj bahut slow aaa rahi

  • @ridj41
    @ridj41 7 месяцев назад

    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

  • @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 6 месяцев назад

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

  • @tech-red24
    @tech-red24 10 месяцев назад

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

  • @pradyumnakubear8561
    @pradyumnakubear8561 2 месяца назад

    Lajawaab

  • @sapworkshop
    @sapworkshop Год назад

    Bro try to speak loudly

    • @nikoo28
      @nikoo28  Год назад

      check my latest videos, if you still find the issue

  • @avinashmv9686894578
    @avinashmv9686894578 6 месяцев назад

    Easy to understand. Thank you.

  • @arpanchakraborty9874
    @arpanchakraborty9874 6 месяцев назад

    Thank you