逆序打印链表

方法一:递归

void PrintListReversingly(ListNode* pHead){
    if (pHead !=NULL){
        if (pHead->m_pNext !=NULL){
            PrintListReversingly(pHead->m_pNext);
        }
        printf("%d\t",pHead->m_nValue)
    }
}
posted @ 2019-08-18 18:19  FromZeroToOne  阅读(111)  评论(0编辑  收藏  举报