C++實現雙鏈表基本接口

首先先簡單經過圖示區分單鏈表和雙鏈表的結構差別: 單鏈表的基本接口實現可參考:單鏈表簡單實現 接下來就是雙鏈表的基本接口實現: #include <iostream> #include <assert.h> using namespace std; typedef int DataType; struct ListNode { ListNode* _next; ListNode
相關文章
相關標籤/搜索