mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-09 22:00:52 +08:00
Polish the chapter of array and linkedlist
This commit is contained in:
@@ -11,8 +11,8 @@ pub fn ListNode(comptime T: type) type {
|
||||
const Self = @This();
|
||||
|
||||
val: T = undefined, // 节点值
|
||||
next: ?*Self = null, // 后继节点引用(指针)
|
||||
prev: ?*Self = null, // 前驱节点引用(指针)
|
||||
next: ?*Self = null, // 后继节点指针
|
||||
prev: ?*Self = null, // 前驱节点指针
|
||||
|
||||
// Initialize a list node with specific value
|
||||
pub fn init(self: *Self, x: i32) void {
|
||||
|
||||
Reference in New Issue
Block a user