Solve ANY Linked List question using these 3 simple techniques...

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

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

  • @AanchalSharma-e4e
    @AanchalSharma-e4e Год назад +6

    00:02 Solve any linked list question with three simple techniques.
    01:03 Using the fast-slow technique with two pointers to traverse a linked list at different speeds
    02:10 Key techniques for handling Linked List questions
    03:17 Techniques to reverse linked list nodes and determine palindrome
    04:16 Use fast-slow pointers to find the midpoint and reverse the second half of the linked list for efficient palindrome checking.
    05:15 Using lead lag to check for palindrome in a linked list
    06:17 Three techniques for solving any linked list problem
    07:16 Asking for feedback on new video format and potential topics to cover

  • @ryanyoung2583
    @ryanyoung2583 Год назад +7

    I was about to leetcode some linked list programs and watched this to review and this is the best algorithms video I have ever seen and it's not even close.

  • @iezioaudi22
    @iezioaudi22 11 месяцев назад +6

    Short, Concise and to the point!
    Thank you!!

  • @eitanjoseph1629
    @eitanjoseph1629 2 года назад +11

    Clearly the best Linked List video of all time

  • @Poopooman690
    @Poopooman690 8 дней назад

    Mashallah brother, you should have continue the explanations on data structures

  • @AanchalSharma-e4e
    @AanchalSharma-e4e Год назад

    00:02 Solve any linked list question with three simple techniques.
    01:03 Using the fast-slow technique with two pointers to traverse a linked list at different speeds
    02:10 Key techniques for handling Linked List questions
    03:17 Techniques to reverse linked list nodes and determine palindrome
    04:16 Use fast-slow pointers to find the midpoint and reverse the second half of the linked list for efficient palindrome checking.
    05:15 Using lead lag to check for palindrome in a linked list
    06:17 Three techniques for solving any linked list problem

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

    Great video bro but quick question. I'm an incoming freshman next semester and took an online python course during my senior year. I struggled and currently struggle to retain a lot of info and I'm trying to practice leetcode/neetcode daily to keep myself fresh. Do you suggest watching vids like yours or certain topics then trying questions or neetcodes or is there another way I should approach retaining concepts I've learned?

    • @sharpcs-elegantcode
      @sharpcs-elegantcode  Год назад +5

      I would recommend breaking your learning down topic-by-topic and doing the following:
      - Watch a video on topic A
      - Take notes on the core concepts
      - Practice targeted coding questions for that topic
      - Review the areas that you found lacking and start the process over again.

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

    BigThanks for the outstanding ideas

  • @ishan3147
    @ishan3147 2 года назад +1

    awesome video!!!

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

    To check palindrome Is it not more efficient to initialize two pointers at the head and the tail and move them in opposite directions until they point to the same address. And just compare the compare the data?

    • @sharpcs-elegantcode
      @sharpcs-elegantcode  Год назад +1

      If you had a doubly-linked list that would definitely be more efficient, however you cannot do that with a singly linked list!

  • @shlyank1
    @shlyank1 2 года назад +1

    Great video!

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

    Great video bro

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

    Great video

  • @shadowperson860
    @shadowperson860 2 года назад +1

    Great Video!!! What’s the new channel 👀

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

    What about in place reversal of linked list ?

    • @sharpcs-elegantcode
      @sharpcs-elegantcode  Год назад

      All of the techniques described in the video are actually "in-place." When using nodes, the only time a solution would not be "in-place" would be if the solution required creating new nodes.

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

    Thank you for the video

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

    Great content brother !😊 This gave me the much needed head start for the Linked List questions , and I think if the situation is correct we can use these techniques in other DSA questions too . Thank u so much😇. I had to like it and m a new subscriber too

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

    in your palindrome example, your fast pointer shouldve moved 3 iterations because on ur video fast is still not null and fast.next is still not null, thus your fast pointer must be at the null node right after the last node

    • @sharpcs-elegantcode
      @sharpcs-elegantcode  Год назад

      The condition we check against is that 𝘧𝘢𝘴𝘵.𝘯𝘦𝘹𝘵.𝘯𝘦𝘹𝘵 is not null. You can see at 4:54 that the fast pointer is at Node B, and B.next.next is null, so we terminate.

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

      oh my bad we had different while loop conditions

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

    good stuff

  • @musee772
    @musee772 2 года назад +3

    Penguin is the best

  • @iamRahulB
    @iamRahulB 9 месяцев назад +1

    Don't lose hope

  • @shivanshchaturvedi3337
    @shivanshchaturvedi3337 3 месяца назад +1

    are you GOD?