From 626f985e0ac033de68b1fad8e7453f8f624e39d2 Mon Sep 17 00:00:00 2001 From: fw_qaq <82551626+Jack-Zhang-1314@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:18:11 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E9=93=BE=E8=A1=A8=E7=90=86=E8=AE=BA?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=20about=20rust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/链表理论基础.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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, +} +``` + -----------------------