diff --git a/problems/链表理论基础.md b/problems/链表理论基础.md index 8378f7f2..455a2bfe 100644 --- a/problems/链表理论基础.md +++ b/problems/链表理论基础.md @@ -218,6 +218,21 @@ class ListNode(_x: Int = 0, _next: ListNode = null) { } ``` +Rust: +```rust +pub struct Node { + value: T, + next: Link, +} + +type Link = Option>>; + +// 附设头节点 +pub struct List { + head: Link, +} +``` + -----------------------