摘要: Leecode 24. 两两交换链表 题目链接:https://leetcode.cn/problems/swap-nodes-in-pairs/description/ 题目描述: 思路:虚拟头节点,注意保存临时节点 题目解答: 循环结束的时候就是,当链表偶数个时cur->next->next=N 阅读全文
posted @ 2025-04-01 20:12 米布丁 阅读(1021) 评论(0) 推荐(0)