From 1b5ba23f003e840e71470424698d1dda34389bb6 Mon Sep 17 00:00:00 2001 From: Sobottasgithub Date: Fri, 16 Jan 2026 08:05:36 +0100 Subject: [PATCH] update: Fixup --- LinkedList.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/LinkedList.java b/LinkedList.java index b452ad1..6938264 100644 --- a/LinkedList.java +++ b/LinkedList.java @@ -63,7 +63,7 @@ public class LinkedList { if (search(prev)) { toFirst(); - while(current.getContent() != prev && hasAccess()) { + while(hasAccess() && current.getContent() != prev) { toNext(); } @@ -74,6 +74,8 @@ public class LinkedList { current.setNextNode(newNode); size++; } + } else { + append(content); } } @@ -93,8 +95,8 @@ public class LinkedList { } current = newCurrent; pointer.setNextNode(current); + size--; } - size--; } public void concat(LinkedList weaponList) {