leetcode 25. Reverse Nodes in k-Group (hard)

class Solution { public: ListNode *reverseKGroup(ListNode *head, int k) { if (head == nullptr || head->next == nullptr || k < 2) return head; ListNode dummy(-1); dummy.next = head; ListN
相关文章
相关标签/搜索