线性链表 - 有效/常用术语?

发布于 2024-09-08 14:53:19 字数 70 浏览 1 评论 0原文

与循环链表相比,线性链接是一个有效/通用的术语吗?对于我发布给学生的一些示例,我需要区分两者,并且不想使用实际上不存在的术语!

Is speaking of a linear linked linked in contrast to a circular linked list a valid / common term? For some examples I'm posting to my students I need to distinguish between both and don't want to use terms which don't actually exist!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

看海 2024-09-15 14:53:19

我简单地称它们为“非循环”。

仅供参考,Lisp 定义了 "proper列表” 作为以空列表终止的列表。 “不正确的”列表可以是“循环列表”或“点线列表”(不是由空列表而是由其他原子终止的列表)。

I would simply call them "non-circular".

Just for reference, Lisp defines "proper lists" as lists that are terminated by the empty list. "Improper" lists can be "circular lists" or "dotted lists" (lists that are not terminated by the empty list but by some other atom).

待天淡蓝洁白时 2024-09-15 14:53:19

我想说线性开放链表是有效的术语,但是,我只在上下文中听说过它们,它们必须与循环链表明确区分开来,否则没有其他限定符的“链表”被假定为线性的。

I would say linear or open linked lists are valid terms, however, I have only heard them mentioned in context where they have to be explicitly differentiated from circular linked lists, otherwise a "linked list" with no other qualifier is assumed to be linear.

谷夏 2024-09-15 14:53:19

我将这些称为“单链表”,尽管这通常只是将它们与“双链表”区分开来。循环链表可以是单链表,也可以是双链表,因此从技术上讲,它不区分它们。然而,我认为我从未听说过有人用任何其他名称引用循环链表(除了可能带有附加量词,即循环双向链表)。

I call those "singly-linked lists" although that usually just distinguishes them from "doubly-linked lists." A circular linked list can be either singly-linked or doubly-linked so technically it doesn't distinguish between them. However I don't think I've ever heard of someone refer to a circular linked list by any other name (except perhaps with additional quantifiers, i.e. - circular doubly-linked list).

瞄了个咪的 2024-09-15 14:53:19

我称它们为

1) 单链表 [1]->[2]->NULL

2) 双向链表 NULL<-[1]<=>[2] <=>[3]->NULL

3) 循环链表 [1]->[2]->[1]

然后可以使用组合制定你自己的条款。然而,问题的描述或问题的解释将澄清术语的实际含义,以防出现任何疑问。

I call them

1) Singly linked list [1]->[2]->NULL

2) Doubly linked list NULL<-[1]<=>[2]<=>[3]->NULL

3) Circular linked list [1]->[2]->[1]

You can then use the combination to make your own terms. However the descriptions of the problem or the explanation to a problem will clarify the actual meanings of the terms, in case there be any doubts.

美煞众生 2024-09-15 14:53:19

您正在寻找的术语是“循环”和“非循环”,适用于所有图形数据结构。正如@Svante 提到的,有时你会看到“正确”、“不正确”和“循环”。

无限制地,对列表的引用意味着“非循环”,因此“非循环”不常见且相当粗糙。

最终,如果您的学生足够成熟,那么“循环”和“非循环”是首选,因为您的学生在从列表到树到 DAG 到图的概括时将再次遇到这些术语。

The terms you are looking for are 'cyclic' and 'acyclic', and apply to all graph data-structures. As @Svante mentioned, sometimes you will see 'proper', 'improper', and 'circular'.

Unqualified, a reference to a List implies 'acyclic', so 'non-circular' is uncommon and rather crude.

Ultimately if your students are mature enough, 'cyclic' and 'acyclic' are preferred as your students will meet these terms again when generalizing from Lists to Trees to DAGs to Graphs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文