链表
love music.
中山大学计算机博士在读,曾就职于腾讯等公司,目前从事AI多模态大模型研究。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PAT甲级 1074 Reversing Linked List (25 分)数组链表
1074 Reversing Linked List (25 分)Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given Lbeing 1→2→3→4→5→6, if K=3, then yo...原创 2018-10-06 18:54:08 · 185 阅读 · 0 评论 -
C++ 反转链表
参考链接:链表翻转的图文讲解(递归与迭代两种实现)这里主要写了非递归的实现反转的函数实现:LNode *reverList(LNode *&head){ if(head == nullptr || head->next == nullptr) return head; LNode *pre = nullptr,*cur = head;//注意pre的初始值是...原创 2018-10-06 19:09:44 · 452 阅读 · 0 评论 -
PAT甲级 1097 Deduplication on a Linked List (25 分)链表
1097 Deduplication on a Linked List (25 分)Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K,...原创 2018-11-09 22:41:32 · 231 阅读 · 0 评论
分享