Created
November 4, 2015 13:31
-
-
Save irrationnelle/8eac6ce09883a0ce16f6 to your computer and use it in GitHub Desktop.
I did not declare and substitude NewHead, I just made 'NewHead->NextNode' point former Head's tail node.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void SLL_InsertHead(Node** Head, Node* NewHead) | |
{ | |
if((*Head) == NULL) | |
*Head = NewHead; | |
else | |
{ | |
NewHead->NextNode = (*Head)->NextNode; | |
*Head = NULL; | |
} | |
} |
Author
irrationnelle
commented
Nov 4, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment