print out a linked list code example
Example: print elements of linked list
void printLinkedList(SinglyLinkedListNode* head) {
while(head!=NULL)
{
cout<<head->data<<endl;
head=head->next;
}
}
void printLinkedList(SinglyLinkedListNode* head) {
while(head!=NULL)
{
cout<<head->data<<endl;
head=head->next;
}
}