摘要: 1.迭代:采用三个指针,来反转链表 class Solution { public: ListNode* reverseList(ListNode* head) { ListNode* cur = head; ListNode* pre = nullptr; while(cur){ ListNode 阅读全文
posted @ 2022-09-30 11:09 xiazichengxi 阅读(35) 评论(0) 推荐(0)