数据结构的javascript描述

这几天在读这本书,发现这本书有好多问题。
https://img.mukewang.com/5c2c3cb40001f49c02670374.jpg


下面这句话是什么意思?

https://img3.mukewang.com/5c2c3cbc0001187404770149.jpg

是不是错了?求解答。


蝴蝶刀刀
浏览 435回答 1
1回答

慕虎7371278

英文原文是这样的:The reason you might want to create a circularly linked list is if you want the ability to go backward through a list but don’t want the extra overhead of creating a doubly linked list. You can move backward through a circularly linked list by moving forward through the end of the list to the node you are trying to reach.个人认为此处中文翻译可能不太合适。总之就是说循环链表最后一个节点的后继节点是第一个节点,从最后一个节点再往后移动,就到了第一个节点,可以重新遍历一次找到你要的节点的意思。我自己的渣翻,改自谷歌翻译:您可能想要创建循环链表的原因是:您希望向前访问链表,但不希望负担创建双向链表的额外开销。您可以在循环链表中向后移动直到超过最后一个节点(然后继续向后移动)来找到你需要达到的节点。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript