三指针
Data Structures & Algorithms · 4 notes
- Swap Nodes in Pairshistorical
Given a linked list, swap every two adjacent nodes and return the head of the modified list. You must solve the problem without modifying node values (only node links may be changed).
- Reverse Linked List IIhistorical
Given a singly linked list and positions left and right, reverse the nodes in that range and return the updated list.
- Reverse Nodes in k-Grouphistorical
Reverse the nodes of the given linked list in groups of k and return the resulting list. If the number of nodes is not a multiple of k, leave the remaining nodes at the end unchanged.