From 09198bf4563e107f7fb8be2406e903c2b3a2aa2e Mon Sep 17 00:00:00 2001 From: sahala318 Date: Wed, 12 Apr 2023 13:42:26 +0800 Subject: [PATCH] Update Program.cs is it should be InsertNodeBefore(node, newNode); ? --- .../CSharpLinkedList/Program.cs" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/\347\254\25411\347\253\240 C#\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204/CSharpLinkedList/Program.cs" "b/\347\254\25411\347\253\240 C#\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204/CSharpLinkedList/Program.cs" index 678eacb..df144b5 100644 --- "a/\347\254\25411\347\253\240 C#\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204/CSharpLinkedList/Program.cs" +++ "b/\347\254\25411\347\253\240 C#\347\232\204\346\225\260\346\215\256\347\273\223\346\236\204/CSharpLinkedList/Program.cs" @@ -177,7 +177,7 @@ public void AddLast(T value) //在某个节点前面插入一个值 public void AddBefore(CSharpLinkedListNode node, CSharpLinkedListNode newNode) { - InsertNodeBefore(node, node); + InsertNodeBefore(node, newNode); //设置头节点 if (node == head)