合并两个有序链表
摘要:1.非递归方式 1 #include "stdafx.h" 2 #include 3 using namespace std; 4 5 struct ListNode 6 { 7 int m_nValue; 8 ListNode *m_pNext; 9 }; 10 11 //合并两个有序链表,非递归方法 12 ListNode *MergeTwoList(ListNode *pListOneHead, ListNode *pListTwoHead) 13 { 14 if (pListOneHead == NULL) 15 { 16 return pListTwoHead..
阅读全文
posted @ 2014-01-02 18:54
浙公网安备 33010602011771号