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;