Great video, thanks for taking the time to put this together this together @TraversyMedia! One small thing. For you insertAt() and removeAt() functions, I'm pretty sure you want to flip the sign and use an || operator to account for less than 0 values. `if (index < 0 || index > this.size)`
I wasn't able to understand all of this after weeks in a computer science course, but 30 minutes into your video I have a much better understanding. You are great at explanations and don't over complicate topics. Thank you so much for this video!
When I first watched this video almost three years ago I was completely lost and could never follow along. I took another shot yesterday and was able to understand it now. If anyone needs help, I will gladly set up a google meet call and explain it with a debugger trace if we need to. Just passing along what others have done for me in the past. Thank you Brad, this was a great explanation!
thank you for always being straightforward and keeping it concise. Been watching your videos and following your tutorials for the past year and they have been an immense help. much love from California!
Excellent introduction to a new topic for me! One edge-case we're missing here for the insertAt() method is a negative value being passed as the index. I found that this can be better handled by setting up the "index out of range" conditional to be: "index < 0 || index > this.size", so we simply return (do nothing with the data value) if the index is less than 0 or greater than the size of the linkedList. In my testing that gives us the functionality we want, without a resulting "Cannot set property 'next' of undefined" if a negative index value is passed.
This dude is a genius. Not just as a developer, but as a teacher. Thanks, Brad! Data structures is by far the most significant hurdle in programming, and I haven't been able to find anyone who can explain the concepts at a level I can understand. It's hard to teach concepts that are basically abstractions built upon abstractions. But from all the resources I've looked at, Brad has come closest, and in JavaScript no less. Bring on more data structures!
nah, his voice is quite boring, it sounds like he wants to just close the editor and throw his monitor out of a window. There is an example of a good teacher/programmer - "net ninja", I strongly recommend to look at his videos.
I think it's great that you've started getting into this topic. I've had a lot of trouble reading about this stuff and then implementing it. But seeing it from you, then thinking about it for a bit, then going back and trying it myself, has really done the trick.
This was very helpful! Today we are learning LInked Lists and React in bootcamp, and this is a great prep for class tonight! Thank you for creating this content!
Thanks for the tutorial, I was doing an exercise from Odin Project and can't seem to wrap my head around this list. Your demonstration was very helpful, once I figured out the head variable was the key to this linked List structure, I picked this up real fast. Thanks!
Thanks a lot for taking the time to explain this. I've been having a difficult time understanding the logic behind linked lists, but now I feel like I am getting it :)
Bro, do all the data structures PLEEEEEEEAAAAAASE. I've been looking for videos that discuss data structures and here you are. God sent. Please do more. Pleeease pleeease
Best tutorial about linked lists. Not just for JS. I searched for java too and this is the best I saw. Since there is just some difference in syntax every c# or java programmer should watch this too.
Hey, Brad, nice explanation. Thanks a lot for this excellent video. I would like just to make a small correction. It seems your range validation is not totally right. You wrote: if (index > 0 && index > this.size), but it will fail passing negative indexes. I believe the correct would be if (index < 0 || index > this.size). What do you think?
Hi Brad, I've been watching your video for years. A little surprised seeing you started algos and data structures. Thanks for sharing. Love you, your Chinese fan.
this brings me back (comp sci degree, but never got a job at it)...good stuff! I think maybe for inserting at index the bound check could be index < 0 || index>size? although using a negative index to insert from the end would be a fun exercise too.
// Insert at index insertAt(data, index) { // If index is out of range if (index > 0 && index > this.size) { ---------this line should be like this----------> if (index < 0 || index >this.size){) return; }
Thx you saved my life... I had a project to do for tomorrow and I knew nothing about that ... I was doing Java but the options are the same so thank you very much
haha i'd been doing this in school algorithm and data structure, we used to implement double linked list. great to see that you jump into it. this course is really cool and understandable. great work . Love From Cameroon
Hey Brad thank you so much man. It's important you know your work is helping people out here. I am more confident in my Javascript cause of your course.
Hey Brad , just want to thank you for all the efforts you take for us.And please upload the important topics of javascript in the point of interview please.
More algos + data structures please! Also some techniques + tips and tricks on how to solve problems. Your tutorials are very informative and easy to understand.
@@blasttrash Naah man :), videos are damn good and informative, but he has this amazing white noise like voice, so if you watch during the night, you will fall asleep in no time. Try it :P
You taught so much about something so difficult, even to people like me who don't understand clear English. Amazing! Thanks for simple explanation dude
I think that you flipped your comparator on line 46. I think you meant to look like ` if (index > 0 || index > this.size) {` which would account for possible negative indexes provided, whereas checking for positive indexes seems like the case that you are looking to execute on.
Hey Brad. Great video. I notice a small problem(?). You use "if (index > 0 && index > this.size)" but if we pass a negative index, the application will throw an error. Instead of "if (index > 0 && index > this.size)", we could use "if(index < 0 || index > this.size)". What do You think?
very nice to start on Data structures and algorithm there a tons of this but not much more easier than you brad I really enjoying to see your tutorials
The way you wrote the Remove method would make it impossible to delete the first item in the list. Here is a version that would let you delete the first item: remove(index){
let current = this.head let previous let count = 0 if (index === 0){ this.head = current.next this.size--; } else{ while (count < index){ count++ previous = current current = current.next } previous.next = current.next } this.size--; }
I have an algorithms and data structures course next semester at college so would like to see more videos like that, discussing various algos and data structures...
This is my getAt method, if you find it more clear: getAtIndex(index){ if(index>0 && index>this.size) return let count = 0 let currentNode = this.head while(count
Thank you very much Brad.I learn many things from you and i like the way you teaching us.please make a full course on data structure , algorithm and graph...Love from Bangladesh
Hi Brad. I have a question. I have seen a lot of companies focus on Data Structures and Algorithms in their Placement Tests but having worked with some tech companies I have never seen much use of DSnA. Most of the work these days is already done for us. Then why so much focus on DSnA? Could it be that I am just not at that level..?
I am a little rusty on algos, data structures, etc but would like to get into this type of stuff, let me know what you guys think about that.
Yes brad please make a crash course or even better a whole data structure series. thanks
Please Continue to do more.
It makes us industry ready
No, You are awesome
Im bad too when it comes to algorithms I keep forgetting about these things
@@alaindimabuyo Yeah, they aren't things I use in my daily projects, however they are great for building muscle in that part of the brain :)
Hey Brad please upload Data structures in js crash course or big course ...please
Great video, thanks for taking the time to put this together this together @TraversyMedia!
One small thing. For you insertAt() and removeAt() functions, I'm pretty sure you want to flip the sign and use an || operator to account for less than 0 values. `if (index < 0 || index > this.size)`
Hey Brad , just want to thank you for all the efforts you take for us.. Would love to have a series on data structure Javascript. Love from India 💓
From East Europe too)
from india too
Most awaited. Please do more videos on data structures.
Can you do queues, stacks, trees, graphs, recursion? if possible Just a whole series on Data structures and algorithms
I wasn't able to understand all of this after weeks in a computer science course, but 30 minutes into your video I have a much better understanding. You are great at explanations and don't over complicate topics. Thank you so much for this video!
When I first watched this video almost three years ago I was completely lost and could never follow along. I took another shot yesterday and was able to understand it now. If anyone needs help, I will gladly set up a google meet call and explain it with a debugger trace if we need to. Just passing along what others have done for me in the past. Thank you Brad, this was a great explanation!
thank you for always being straightforward and keeping it concise. Been watching your videos and following your tutorials for the past year and they have been an immense help. much love from California!
You make learning so much easy. Really appreciate you taking the time to make me understand this better than most tutorials out there!!!!
the best video i have seen about linked lists, simple and straight to the point. Well done.
Excellent introduction to a new topic for me!
One edge-case we're missing here for the insertAt() method is a negative value being passed as the index. I found that this can be better handled by setting up the "index out of range" conditional to be: "index < 0 || index > this.size", so we simply return (do nothing with the data value) if the index is less than 0 or greater than the size of the linkedList. In my testing that gives us the functionality we want, without a resulting "Cannot set property 'next' of undefined" if a negative index value is passed.
This dude is a genius. Not just as a developer, but as a teacher. Thanks, Brad! Data structures is by far the most significant hurdle in programming, and I haven't been able to find anyone who can explain the concepts at a level I can understand. It's hard to teach concepts that are basically abstractions built upon abstractions. But from all the resources I've looked at, Brad has come closest, and in JavaScript no less. Bring on more data structures!
nah, his voice is quite boring, it sounds like he wants to just close the editor and throw his monitor out of a window. There is an example of a good teacher/programmer - "net ninja", I strongly recommend to look at his videos.
I think it's great that you've started getting into this topic. I've had a lot of trouble reading about this stuff and then implementing it. But seeing it from you, then thinking about it for a bit, then going back and trying it myself, has really done the trick.
Dude this should indeed be a series, best explanation ever on this topic
that's a great example of creating and working with Linked Lists on JavaScript. Thank you
I laughed in this coffee shop when you said, "But don't be a dick about it!" Haha!
Me too..that was great!!! :-)
and here I thought it was only me rofl.
I'm a Full Stack student and just wanted to thank you for this video! It really helped me wrap my brain around the concept of Linked Lists👊🏾
Quite glad that you are getting your feet in core CS . It's a rabbit hole from here on and it's really fun as you start diving deeper.
This was very helpful! Today we are learning LInked Lists and React in bootcamp, and this is a great prep for class tonight! Thank you for creating this content!
the goat, feeling much more comfortable with LinkedLists after this video. Thank you.
Thanks for the tutorial, I was doing an exercise from Odin Project and can't seem to wrap my head around this list. Your demonstration was very helpful, once I figured out the head variable was the key to this linked List structure, I picked this up real fast. Thanks!
Thanks Brad, you did an amazing job again. Finally you did data structures and algorithm 👏🏼💪🏻
Thanks a lot for taking the time to explain this. I've been having a difficult time understanding the logic behind linked lists, but now I feel like I am getting it :)
Initially i did this data structure on my own and then watched your implementation, and this really makes your brain find different solutions
Bro, do all the data structures PLEEEEEEEAAAAAASE. I've been looking for videos that discuss data structures and here you are. God sent. Please do more. Pleeease pleeease
Thank you for doing this. Please do them for all of the Data Structures. This will be super useful for people try to start out
Best tutorial about linked lists. Not just for JS. I searched for java too and this is the best I saw. Since there is just some difference in syntax every c# or java programmer should watch this too.
Brad i realy don`t understand why you don`t have at least a million subscribers. You're one of the best youtube IT-blogers (for me you`re the best).
Of course as i've been getting into linked lists, here Brad is with a brand new course on it, love it!
Hey, Brad, nice explanation. Thanks a lot for this excellent video. I would like just to make a small correction. It seems your range validation is not totally right. You wrote: if (index > 0 && index > this.size), but it will fail passing negative indexes. I believe the correct would be if (index < 0 || index > this.size). What do you think?
Hi Brad, I've been watching your video for years. A little surprised seeing you started algos and data structures. Thanks for sharing. Love you, your Chinese fan.
this brings me back (comp sci degree, but never got a job at it)...good stuff! I think maybe for inserting at index the bound check could be index < 0 || index>size? although using a negative index to insert from the end would be a fun exercise too.
15:49 "Just don't be a dick about it please." LOL! Thanks for being a real one Brad, and for always producing easy-to-follow videos.
This video was super helpful and informative. thank you Brad!
// Insert at index
insertAt(data, index) {
// If index is out of range
if (index > 0 && index > this.size) { ---------this line should be like this----------> if (index < 0 || index >this.size){)
return;
}
I checking for this comment :)
That'd mean it won't insert when index is greater than zero even if it's less than the list size. if (index > 0 && index > this.size) is correct.
you just blow it!!!! How you even do it ....I must say you are X-MEN Mutant YOU JUST MADE LINKDLIST SUPER EASY WITH MOST CONFUSING MODERN JS WOW
Great tutorials , sir
You made me a real Developer.
Thx you saved my life... I had a project to do for tomorrow and I knew nothing about that ... I was doing Java but the options are the same so thank you very much
First 10 mins was all i needed, my professor couldn't explain this in 3 hrs.
haha i'd been doing this in school algorithm and data structure, we used to implement double linked list. great to see that you jump into it. this course is really cool and understandable. great work . Love From Cameroon
Hey Brad thank you so much man. It's important you know your work is helping people out here. I am more confident in my Javascript cause of your course.
This tutorial made linked links easy for me
"Don't be a dick about it" I love how honest you are man...
thank you, your tutorials are helping us a lot a appreciated. 🙏
Hey Brad , just want to thank you for all the efforts you take for us.And please upload the important topics of javascript in the point of interview please.
More algos + data structures please! Also some techniques + tips and tricks on how to solve problems. Your tutorials are very informative and easy to understand.
Thank you Brad. Aye for the series on data structures and algorithms. I watch your videos for dual purpose, to learn and to fall asleep.
r u implying that his vids are boring? :P
@@blasttrash Naah man :), videos are damn good and informative, but he has this amazing white noise like voice, so if you watch during the night, you will fall asleep in no time. Try it :P
You taught so much about something so difficult, even to people like me who don't understand clear English. Amazing! Thanks for simple explanation dude
Amazing man. Thanks for everything. Trully amazing. i grasped everything after carefully watching the video
Can't wait for that. The normal projects have become quite popular here on RUclips
Line 93 change(index > 0 && index > this.size) to if (index < 0 || index > this.size)
Finally some data structures
Thanks
Thank you! Your video is even better than a book i bought
Yes! More of these please. Maybe some video about pointers and stuff like that.
Thanks brad for your efforts. would love to have a series on data structures and algorithms.
"just don't be a dick about it please" caught me off guard. So funny. Thanks for the video, helps to hear different people talk about data structures.
Nice LL overview that is easy to follow and understand. Thanks!
Thanks Brad! This is a good video. Looking forward to learn data structures and algos from you :)
Hey Brad , really love your work . Thanks a lot. A big inspiration for me.
Thanks for this new lesson! I loved it. I would thank much more for other lessons about those programming core subjects applied to JavaScript.
As always, your tutorial is the best. Thank you!
Please, more videos about algorithms and data structures
C'est la base d'algorithme de liste chaînée. Très bien expliquée
Your effort and tutorial help us alot. Love to learn data structures in JavaScript from you
Thank you very much, a must needed topic to discuss.
Thank you brad and please upload more videos on algorithms.
Thank you
Sweet. This takes me back to my university days. Love it!
I think that you flipped your comparator on line 46. I think you meant to look like ` if (index > 0 || index > this.size) {` which would account for possible negative indexes provided, whereas checking for positive indexes seems like the case that you are looking to execute on.
Yes, Keep them comin Brad! Damn you are creeping towards 1mil subs! Good job!
@ 7:10 I saw you almost naming your method insertHead.
Nicely explained! More of these computer science flavored videos are very much welcomed :-D
Hey Brad. Great video. I notice a small problem(?).
You use "if (index > 0 && index > this.size)" but if we pass a negative index, the application will throw an error. Instead of "if (index > 0 && index > this.size)", we could use "if(index < 0 || index > this.size)". What do You think?
Love the video, nice work as always!
very nice to start on Data structures and algorithm
there a tons of this but not much more easier than you brad
I really enjoying to see your tutorials
Thank you so much, I have been waiting for something like this.
Create more content like this. 😄
Hi brad Sir, without watch this video because I know you always bring great stuff that is easy to learn. I am greatfull you.
Yes! More data structures please
Thank you Brad. You are turning me into an awesome developer.
Was waiting list data structure from you and finally. Thank you Brad.
Really helpful! Thanks again Brad!
Do more algos and data structures! Thanks for the awesome videos!
Programming itself is an algorithm and this is useful. Thank you !
Yaaaaaaasssssssss!!! BRAD PLEEEEAAAAASSSSSEEEEEEEE! KEEP DOING MORE TUTORIALS LIKE THIS!
You explain things very well. I always come back here to learn new sorcery :P
The way you wrote the Remove method would make it impossible to delete the first item in the list. Here is a version that would let you delete the first item:
remove(index){
let current = this.head
let previous
let count = 0
if (index === 0){
this.head = current.next
this.size--;
}
else{
while (count < index){
count++
previous = current
current = current.next
}
previous.next = current.next
}
this.size--;
}
THis is pure knowledge :) Thanks Brad
Please make a complete series of data structures and algorithms in javascript.
I have an algorithms and data structures course next semester at college so would like to see more videos like that, discussing various algos and data structures...
Thank u for this awesome video, please make whole series on data structure
Awesome. I was waiting for this. Please make more data structure and algorithm videos
This is my getAt method, if you find it more clear:
getAtIndex(index){
if(index>0 && index>this.size) return
let count = 0
let currentNode = this.head
while(count
Really good man, looking forward to more such content. ThankYou
Thank you very much Brad.I learn many things from you and i like the way you teaching us.please make a full course on data structure , algorithm and graph...Love from Bangladesh
Definitely would like to see more on data structures.
Amazing explanation, thank you so much!
Thanks Brad, please do more of these
Thank you for all the wonderful content
I love the way you play with. You are talented in how to deliver information Thnx 😘 bro
Hi Brad. I have a question. I have seen a lot of companies focus on Data Structures and Algorithms in their Placement Tests but having worked with some tech companies I have never seen much use of DSnA. Most of the work these days is already done for us. Then why so much focus on DSnA? Could it be that I am just not at that level..?
Awesome video. Please do more videos on data structures.