/** * struct ListNode { * int val; * struct ListNode *next; * }; */ class Solution { public: /** * * @param head ListNode类 * @param k int整型 * @return ListNode类 */ void reverse(ListNode* list){ ListNode* pre = nullptr, *cur = list, *next; while(cur){ next = cur->next; cur->next = pre; pre = cur...