thanks for such clear explanation but what i fail to understand is that why is knowing about such things needed? seeing as they arent directly implemented in any programming language, what will they do that something like an array cannot accomplish? and why do they matter?
That's a very pertinent question, and it's something that even I have spent time thinking about. To be exact, the difference comes in the storage and access of data. For example, take insertion. An array takes O(n) complexity for insertion whereas a LinkedList takes O(1). This doesn't make a difference when the lengths are small, but for bigger input sizes, it has a significant difference in processing time which might make a certain algorithm much faster or slower depending on which data structure you are using. Plus if you're into solving problems on platforms like LeetCode or CodeForces, TLEs (Time Limit Exceeds) are exceedingly common. Those can be avoided by using appropriate data structures for appropriate purposes. I hope that answers your question!
I have a question, in the insert_at_the beginning function for the doubly linked list, why are you passing the tail, if you just return it and do not use it in the function, can you not skip it?
I had the same question. If u remove tail nothing will change. It’s useless. Maybe this code structure is needed in any leetcode problems, I don’t know…
hey Greg best explanation i have got so far . I have a question , Is this fundamental DSA theory playlist is completed for learning complete data structures?
Node doesn't start at 1 we access every node by the pointer(which stores address) which is head in this video . Basically head it stores or points the address of the first node in linked list, for better understanding learn cpp there you can learn in depth
thanks for such clear explanation but what i fail to understand is that why is knowing about such things needed? seeing as they arent directly implemented in any programming language, what will they do that something like an array cannot accomplish? and why do they matter?
@@AlborzBorzoo you may make a stack implementation with an array in some language , however if you tried to do the same thing with the queue it will work but it would be way slower as in the array in order to pop elements from the left all the other elements in the array would be shifted therefore taking O(n) complexity unlike the linked list implementation of the queue
Master Data Structures & Algorithms For FREE at AlgoMap.io!
I bet my life that this would be the most informative and non repetitive DSA course on TH-cam
Haha thank you! It seems to be going well so far
I love the fast paced explanation, it's non repetitive flow of new information, you definitely my new favorite gregg 😁
Back then i have done data structures in c++. In python it is lot more easier to understand and implement 😂. Thanks to you! ❤
Yes it definitely is haha
I'm currently busy with personal stuff but Pls keep it up definitely I'm going to brush up your series for DSA prep ❤
Awesome
I understood the code but didn't understand the concept prior to this video, now I do. Tysm
That's Awesome man, Thank you for such high-quality content.
You're very welcome!
Great video. I understand it now 100%
Glad to hear it!
Great Explanation
Keep up the good work 👏
Thank you!!
Thanks for your tutorial you are great ❤
Thanks so much!!!
Thank you very much! Very informative
Awesome ❤
❤️
Great ❤
Hey dude you have great teaching skills.but i have a question will you cover all the topics of dsa in this coures?
Learning!
Thanks!
thanks
thanks for such clear explanation
but what i fail to understand is that why is knowing about such things needed?
seeing as they arent directly implemented in any programming language, what will they do that something like an array cannot accomplish? and why do they matter?
That's a very pertinent question, and it's something that even I have spent time thinking about.
To be exact, the difference comes in the storage and access of data. For example, take insertion. An array takes O(n) complexity for insertion whereas a LinkedList takes O(1). This doesn't make a difference when the lengths are small, but for bigger input sizes, it has a significant difference in processing time which might make a certain algorithm much faster or slower depending on which data structure you are using. Plus if you're into solving problems on platforms like LeetCode or CodeForces, TLEs (Time Limit Exceeds) are exceedingly common. Those can be avoided by using appropriate data structures for appropriate purposes.
I hope that answers your question!
I have a question, in the insert_at_the beginning function for the doubly linked list, why are you passing the tail, if you just return it and do not use it in the function, can you not skip it?
I had the same question. If u remove tail nothing will change. It’s useless. Maybe this code structure is needed in any leetcode problems, I don’t know…
kind of useless
hey Greg best explanation i have got so far . I have a question , Is this fundamental DSA theory playlist is completed for learning complete data structures?
Why does insert_at_beginning need to take tail when all it does is return it.
idk
Why do nodes start at 1 but lists start at 0?
they don't the position we use in nodes is just for our understanding it isn't there actually
Node doesn't start at 1 we access every node by the pointer(which stores address) which is head in this video .
Basically head it stores or points the address of the first node in linked list, for better understanding learn cpp there you can learn in depth
thanks for such clear explanation
but what i fail to understand is that why is knowing about such things needed?
seeing as they arent directly implemented in any programming language, what will they do that something like an array cannot accomplish? and why do they matter?
@@AlborzBorzoo you may make a stack implementation with an array in some language , however if you tried to do the same thing with the queue it will work but it would be way slower as in the array in order to pop elements from the left all the other elements in the array would be shifted therefore taking O(n) complexity unlike the linked list implementation of the queue