/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ #include <iostream> class Solution { public: ListNode* reverseLinklist(ListNode* head) { //逆置链表 ListNode* cur = head, *pre=NULL, *temp = NULL; while(cur){ temp = cur->next; cur-&...