#include<iostream> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x): val(x), next(NULL) {} }; ListNode* creatlist(int* arr, int n) { ListNode* dummyhead = new ListNode(0); //创建哑结点 ListNode* p = dummyhead; for (int i = 0; i < n; i++) { p->next = new ListNode...