From 5e4418376b1aa46da6d5ea9b76a599e01de26727 Mon Sep 17 00:00:00 2001 From: "paul-anton.engel@informatik.hs-fulda.de" Date: Wed, 22 Nov 2023 16:40:40 +0100 Subject: [PATCH] =?UTF-8?q?Paul:=20=C3=9Cberarbeitung=20getElement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SparseVector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SparseVector.java b/SparseVector.java index 8ed337b..34598d4 100644 --- a/SparseVector.java +++ b/SparseVector.java @@ -69,7 +69,7 @@ public class SparseVector { Node now = this.head; while (now != null && now.index < index) { - if (now != null && now.index == index) { + if (now.index == index) { return now.value; } now = now.next;