# Introduction to Linked Lists (Data Structures & Algorithms #5)

20
29

Learn the basics of linked lists. Java & Python sample code below.

Check out Brilliant.org ( a website for learning math and computer science concepts through solving problems. First 200 subscribers will get 20% off through the link above.
Special thanks to Brilliant for sponsoring this video.

Find sample code in Python and Java here:

This was #5 of my data structures & algorithms series. You can find the entire series in a playlist here:

Also, keep in touch on Facebook:

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

1. Hey everyone! If you are looking for more practice problems for arrays and linked lists, I’d also recommend my Udemy course, “11 Essential Coding Interview Questions” here: https://goo.gl/v35LCa

It’s supposed to be for programming interview questions, but it should be a good resource for improving your problem-solving skills in general.

Anyway, thanks as always for watching! If you don’t want to pay for the course, remember that I have a ton of other free videos right here on this YouTube channel 🙂

2. def count_nodes(node):

count = 1

if node.next_node is not None: count = count + count_nodes(node.next_node)

return count

3. You're an incredible teacher. Hope these videos never end and stretch across even the most advanced of topics. Very enjoyable.

4. public static int countNode(ListNode head) {

int count = 1;

count++;

}

return count;

}

int count=0;

while(temp!=null){

temp=temp.next;

count++;

}

return count;

}

6. How did you implement the linked list class? I dont remember seeing you do it but I might have not been paying complete attention. Also is the next video on linked lists out yet?

7. in C#
{
return 0;

int count=1;
while(curr.next != null){
curr=curr.next;
count++;
}

return count;

}

8. Hey….I have watched several videos but didn't understand how linked lists exactly worked. After watching ur video I have understood exactly how they work. Great explanation. However, I'm really sad to know that you don't post any videos now. Please let us know why.

I wonder if you can explain react hooks for us. please~~~

10. I did it recursively:

int count = 0;
}

private int countNodesHelper(Node node, int count) {
if (node != null) {
return countNodesHelper(node.next, count+1);
}
return count;
}

11. public static int countNodes(Node head) {
int count = 0;