Print the Elements of a Linked List

  • + 0 comments

    void printLinkedList(SinglyLinkedListNode* head) {

    auto current = head;
        while(current){
        std::cout << current->data << std::endl;
        current = current->next;
    }
    

    }