 What's up guys, my name is Michael and welcome to my YouTube channel today we are going to go over how to insert a node at the head of a link list. So this is pretty basic. I already have worked the code out. So I guess you guys could just see and I'll just explain how you do it. Basically first you got to create your new node, right, your new node. So here I did singly link list new node new node is equal to new singly link list node. Right. And then I created the data, we have to set equal to the data that was passed into the function. So this is the data that was passed into the function. And then what I had to do was like, I have to set the next node of our new node to point to the head of the list, right, because we're inserting at the front. So I did new nodes next points to the head of the list. And then after that, they said to return the new head, right, they would return the new head. So because now we're inserting at the head of the list. And our new node is inserting in the front of the list. We just returned the new node because that's our new new head. Right. So like, if I were to draw this out, if we had like, we had like, kind of one, two, and then three, and if I want to insert four to the head. So this is the, this is the head of the list, right. What I would do as I create a four, I pointed to this head of the list for his next, this is the next pointer, by the way, this is the next pointer pointed to the head of the list. And after that, I just return my new head, which is four. And that's what this code basically does. It creates a new list, a new link list node sets its data to the data that's passed in since the next node to equal to the head of the list. And then we just returned then our new node. So yeah, this pass all the test cases. Hope you guys enjoyed this video. It's pretty quick. Rate, comment, subscribe. I'll check you guys later. Peace.