Polish the chapter of array and linkedlist

This commit is contained in:
krahets
2023-08-17 05:13:19 +08:00
parent 0858ab91c0
commit c310edb672
26 changed files with 287 additions and 236 deletions

View File

@@ -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 {