mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-05 11:41:22 +08:00
Change the operations sequence of the likedlist's insert() method.
This commit is contained in:
@@ -13,8 +13,8 @@ public class linked_list
|
||||
public static void insert(ListNode n0, ListNode P)
|
||||
{
|
||||
ListNode? n1 = n0.next;
|
||||
n0.next = P;
|
||||
P.next = n1;
|
||||
n0.next = P;
|
||||
}
|
||||
|
||||
/* 删除链表的结点 n0 之后的首个结点 */
|
||||
|
||||
Reference in New Issue
Block a user