Data Structures: Linked Lists

28
11



Learn the basics of Linked Lists. This video is a part of HackerRank’s Cracking The Coding Interview Tutorial with Gayle Laakmann McDowell.

Nguồn:https://wijstaanvooronzegrondrechten.org/

28 COMMENTS

  1. It's much easier to pay attention and understand if you mute the video and play 009 Sound System – Dreamscape in the background.

  2. Any conversation about linked lists should BEGIN with the following warning:

    "You probably shouldn't be using a linked list for this."

  3. If I instantiate the node class, wouldn't it go into inifinite recursion when it tries to make an instance of itself at line 2: 'Node next'? Also how is it instantiated without passing in the argument for the constructor?

  4. Thank you so much. The visual representation that changes with each new line of code is so helpful for a concept like this. Code for nodes can often look kind of cryptic without a visual representation of how things move.

  5. what actually gets returned in the public void append(int data) method? I'm confused as to why you need the return statement on line 17?

  6. The wrapper class of LinkedList dynamically changes the head by prepending to inform other "lists" pointers. This is really neat! Thank you!

  7. So linked list are actually objects that point to another object? And at 2:30 when you write 'Node next' does the program already know what 'next' does? Is 'Node next' like a method that is predefined within the program??

  8. what that *p,*temp; in the comments of below program ??

    struct node{

    int item;

    struct node *next;

    } new_node;

    // *p , *head,*temp;

  9. Im sitting for half a year with this and cant do it at all from scratch let alone writing function for it . Everyone have diffirent way of doing this , so i cant really get it how to make it (in C)

  10. That is an amazing explanation. I have two questions
    1. Does the deleted node garbage collected?
    2. How to delete a node with duplicate data. I.e.If there are multiple nodes with same data and we want to delete the last data Node. ? How do we differentiate the two nodes with same data ?

LEAVE A REPLY

Please enter your comment!
Please enter your name here