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
相關文章
相關標籤/搜索