Middle of a Linked List (LeetCode 876) | Full Solution with animations | Study Algorithms

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

КОМЕНТАРІ • 21

  • @abhineveash
    @abhineveash 20 годин тому +1

    Ultimate explanation ❤

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

    The way of explaining is amazing......
    infinite likes

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

      glad i could help

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

    Explanation is gold! Thank you my good sir!

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

    The way you explain is mind blowing. Keep posting such videos!! Thanks a lot

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

    nice explanation sir i understood now slow and fast pointer method .
    Thank you🙂

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

    Thank you so much for this explanation and I understood it perfectly

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

    very good explanation and thought. thank you sir

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

    Explained Perfectly! Thanks

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

    Amazing explanation sir!

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

    Thanks sir for great explanation

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

    Awesome teaching!

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

      So happy to read this.

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

    Great example

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

    while loop looks incorrect as you are saying "or" condition but programmed "and" condition. But, I checked further and confused about why does the program fail when worked with "or " condition?

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

      it just means that you need to run the while loop until both fastPtr and fastPtr.next are not null

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

    sir what if the length of LL is bigger?

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

    Can we use (slowPtr != null) with remaining conditions in while loop I think this will also work
    May I know why you are not adding (slowPtr != null) in while condition.

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

      why do you want to add additional conditions?

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

      @@nikoo28 we are moving slow pointer along with fast ptr right then why we are not adding slow pointer

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

      @@kalyanamvenumadhav2245 fast pointer is moving twice the speed isnt it obvious it will reach null first.