7.3 链表
小魚兒.
天下皆白,唯我独黑!
展开
-
7.3 PAT A1097 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,...原创 2019-09-27 15:33:28 · 85 阅读 · 0 评论 -
7.3 PAT A1052 Linked List Sorting (25 分)(静态链表的应用)
1052 Linked List Sorting (25 分)A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointe...原创 2019-09-26 15:28:29 · 87 阅读 · 0 评论 -
7.3 PAT A1074 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 L being 1→2→3→4→5→6, if K=3, then y...原创 2019-09-27 14:35:29 · 124 阅读 · 0 评论 -
7.3 PAT A1032 Sharing (25分)(静态链表)
1032 Sharing (25分)To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same ...原创 2020-04-18 14:54:08 · 116 阅读 · 0 评论