# 05.12 练习

* 尝试修改将 `generatePassword.go` 背后的逻辑，新的程序将使用当前系统时间或日期生成一个 Go 切片，然后使用这个切片生成一个密码列表，再从中挑选一个密码。
* 修改 `queue.go` 的代码使其能够存储浮点数而不是整数。
* 修改 `stack.go` 的代码，使其节点拥有 `Value`、`Number` 和 `Seed` 三个整型的数据字段。除了明显要对 `Nodestruct` 的定义进行修改，你还需要对剩下的程序做出什么改动？
* 你能试试修改 `linkedList.go` 的代码，使其能够保持链表中的节点有序吗？
* 类似的，你能修改 `doublyLList.go` 中代码使其能保持节点有序吗？你能开发一个删除已存在节点的函数吗？
* 修改 `hashTableLookup.go` 的代码使得哈希表中没有重复的元素。你可以使用 `lookup()` 函数！
* 你能修改 `generatePassword.go` 中的代码使生成的密码只包含大写字母吗？
* 试试修改 `conHeap.go` 使其除了能支持 `float32` 元素外还能支持自定义的、更复杂的结构。
* 实现 `linkedList.go` 中缺失的删除节点的功能。
* 你觉得如果使用双向链表的话是否能改善 `queue.go` 程序中的代码呢？试着用双向链表代替单向链表实现一个队列。


---

# 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.12.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.
