Data Structures: Singly Linked Lists and Doubly Linked lists implementation in C

preview_player
Показать описание
Singly and Doubly linked lists hold some advantage over arrays and may be more appropriate depending on your use case. Always good to have options.

Hope you enjoyed the video!

Check out this code here:

Join my Discord server to chat with me:

Check out some code on my GitHub:

Come visit us on Reddit:

Other Social:
Рекомендации по теме
Комментарии
Автор

These are a great entry point to circular linked lists and trees. It's amazing what possibilities open up when you start putting pointers in structs.

thegreatb
Автор

Thank you, great stuff as usual. We need more C, data structures, cryptography, networking :)
Keep it up.

joe_rogan
Автор

I think you should use diagrams to explain such concepts with diagrams too

prabhjeevnijjar
Автор

Thank you! Great video!
A good practice working with malloc is to make sure it has returned a valid pointer. malloc can actually fail and return NULL. This is a sort of a “crisis” because it means that the OS couldn’t allocate memory. The reasons for this could be numerous but no matter what, the programmer should shut the program down because this way or another it’s about to crash- either the programmer continues without exiting and checking for NULL and than he will try to dereferance a NULL which will end in a segmentation fault.OR he will check for it but still won’t be able to allocate any more memory.
Hope this tip helps 😎

nadavbarsheshet
Автор

Worth mentioning that you can use lists to implement two other abstract data types. If you just add and remove to the front of the list then that is a Stack. If you add at front and remove at the end then that’s a Queue.

GrahamStw
Автор

just in time for my data structures class, tysm

mattcall
Автор

thanks for sharing your knowledge! love it!

williamsays
Автор

Wait, in the double linked list, wouldn't it be easier if you had a tail link too?

In addition, when one work with larger double linked lists, one should also have a count variable, a middle link, and perhaps also a first_quarter and a third_quarter to make searching the list faster. Then when you search the list, you'll begin by looking at the middle node, and if your data is lower or higher, you'll never need to search more than half the list to find your item. When the list is big enough to be quartered, you'll look at the middle node, and then the quarter node in the correct direction, the search less than one quarter of the list

koppadasao
Автор

Hello!
I was watching one of your live streams some time ago, and you were talking about how you can use C files and Python files together in the same project, so that when you need more speed you can use and if you can do easier things, you could just use Python.
Can you link me the stream? Or just explain it to me in this comment? Or make a video about it or something ahahah? I tried to google it, but I just get Cython results, which is not what I am looling for!

qwerasdfhjkio
Автор

which programm do you use for recording and editing inside xubuntu? :)

SuperBlackBeto
Автор

100th like was given by me!...seems like an achievement :X

rock
Автор

Nice and clear explanation, thanks!
As others have said, a visual representation might be helpful for newbies.

greob
Автор

I want to see how to implement the code without using global variables. I mean, pass all the variables via pointers.

psyscrpin
welcome to shbcf.ru