# 05.6.2 双向链表的优点

双向链表的功能比单向链表更加丰富，你可以从任意方向遍历双向链表，也可更容易地在双向链表中增删元素。此外，即使弄丢了指向双向链表头节点的指针，你也可以重新找回它。然而，这种多功能性的代价就是每个节点需要维护两个指针。开发者需要考虑这种额外的复杂性是否值得。

总之，你的音乐播放器中的歌单用的可能就是双向链表，所以你才能切换到上一首歌和下一首歌！


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wskdsgcf.gitbook.io/mastering-go-zh-cn/05.0/05.6/05.6.2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
