Linked Lists - Singly & Doubly Linked - DSA Course in Python Lecture 3
Вставка
- Опубліковано 5 лют 2025
- Code solutions in Python, Java, C++ and JS can be found at my GitHub repository here: github.com/gah...
The Python Colab notebook can be found at this link: colab.research...
Master Data Structures & Algorithms for FREE at AlgoMap.io/
Complete DSA Pathway Zero to Hero: • Data Structures & Algo...
Please check my playlists for free DSA problem solutions:
• Fundamental DSA Theory
• Array & String Questions
• 2 Pointers Questions
• Sliding Window Questions
• Binary Search Questions
• Stack Questions
• Linked List Questions
• Tree Questions
• Heap Questions
• Recursive Backtracking...
• Graph Questions
• Dynamic Programming (D...
My Data Science & ML UA-cam Playlist: • Greg's Path to Become ...
Learn Python and Data Science FASTER at mlnow.ai :)
Support the content: / @greghogg
Follow me on Instagram: / greghogg5
Connect with me on LinkedIn: / greghogg
Follow me on TikTok: / greghogg5
Coursera Plus: imp.i384100.ne...
My Favorite Courses:
Data Structures & Algorithms:
UCalifornia San Diego DSA: imp.i384100.ne...
Stanford Algorithms: imp.i384100.ne...
Python Data Structures: imp.i384100.ne...
Meta Coding Interview Prep: imp.i384100.ne...
Python:
UMichigan Python for Everybody: imp.i384100.ne...
Python Mastery from MLNOW.ai: mlnow.ai/cours...
Google IT Automation w/ Python: imp.i384100.ne...
Web Dev / Full Stack:
Meta Front-End Developer: imp.i384100.ne...
IBM Full Stack Developer: imp.i384100.ne...
Meta Back-End Developer: imp.i384100.ne...
John Hopkins HTML, CSS & JS: imp.i384100.ne...
IBM DevOps: imp.i384100.ne...
Cloud Development:
AWS Fundamentals: imp.i384100.ne...
GCP Cloud Engineer: imp.i384100.ne...
Microsoft Azure Fundamentals: imp.i384100.ne...
Game Development:
Michigan State Unity Development: imp.i384100.ne...
UColorado C++ for Unreal Engine: www.coursera.o...
SQL & Data Science:
SQL by MLNOW.ai: mlnow.ai/cours...
Python for Data Science by MLNOW.ai: mlnow.ai/cours...
Google Data Analytics: imp.i384100.ne...
IBM Data Science: imp.i384100.ne...
IBM Data Engineer: imp.i384100.ne...
Machine Learning & AI:
ML Mastery at MLNOW.ai: mlnow.ai/cours...
ML w/ Andrew Ng: www.coursera.o...
Deep Learning w/ Andrew Ng: imp.i384100.ne...
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 UA-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
@@GregHogg skibidi GregHogg
I understood the code but didn't understand the concept prior to this video, now I do. Tysm
Superb explanation....👏👏
That's Awesome man, Thank you for such high-quality content.
You're very welcome!
Great Explanation
Keep up the good work 👏
Thank you!!
this is exactly what i needed , thanks a lot
Great video. I understand it now 100%
Glad to hear it!
Thanks for your tutorial you are great ❤
Thanks so much!!!
Hey dude you have great teaching skills.but i have a question will you cover all the topics of dsa in this coures?
Removing an arbitrary node from single or double linked list should be O(n) 8:27
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?
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
Thank you very much! Very informative
Awesome ❤
❤️
Great ❤
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!
Learning!
thanks
Thanks!
curr is a pointer. if we print(curr) I assumed that it would print the address/reference to the node curr is pointing at. how does it print the value of the current node it is pointing at without explicitly writing print(curr.val) ?
Hey I tried running by removing the .val and still it's working. I think the function of these Head, A , B ,C is to just point to each other by using .next like curr.next-> Head.next-> A and store the values in them. They are basically kind of objects where the class's return value is the val itself.
Your voice is very similar to Shroud.
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