更改 0024.两两交换链表中的节点.md C语言格式

This commit is contained in:
Guanzhong Pan
2022-01-02 18:33:21 +00:00
parent ac735d918b
commit e3f9268351

View File

@ -107,7 +107,9 @@ struct ListNode* swapPairs(struct ListNode* head){
newHead->next = head; newHead->next = head;
return newHead; return newHead;
} }
```
```c
//迭代版本 //迭代版本
struct ListNode* swapPairs(struct ListNode* head){ struct ListNode* swapPairs(struct ListNode* head){
//使用双指针避免使用中间变量 //使用双指针避免使用中间变量