Last active
August 18, 2019 20:05
-
-
Save tanaytoshniwal/6acc0d5be12ac135a5397075ccaf4a13 to your computer and use it in GitHub Desktop.
Linked List Printing Function
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 print(Node* head){ | |
if(head==NULL){ | |
return; | |
} | |
Node* temp = head; | |
while(temp != NULL){ | |
cout << temp->data << " "; | |
temp = temp->next; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment