来源:www.rxwcv.cn 双向链表的数据结构 struct ListNode { int val; struct ListNode *pre; struct ListNode *next; ListNode(int x) : val(x), pre(NULL), next(NULL) { } }; 双向链表的初始化 ListNode* createList() { ListNode* head = new ListNode(-1); ListNode* node = head; vector<int> nums = { 1,2,3 }; for (int i = 0; i ...