

// Complete the reversePrint function below.

/*
 * For your reference:
 *
 * SinglyLinkedListNode {
 *     int data;
 *     SinglyLinkedListNode* next;
 * };
 *
 */
void reversePrint(SinglyLinkedListNode* head) {
    if(head->next==nullptr){
        cout<<head->data<<endl;
        return;
    }
    reversePrint(head->next);
    cout<<head->data<<endl;

}

