Skip to content

Commit 1ebe273

Browse files
pmd done
1 parent 64911e3 commit 1ebe273

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/test/java/com/thealgorithms/datastructures/lists/SelfOrganizingLinkedListTest.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import static org.junit.jupiter.api.Assertions.assertNull;
66
import static org.junit.jupiter.api.Assertions.assertTrue;
77

8-
import java.util.ArrayList;
9-
import java.util.List;
108
import org.junit.jupiter.api.BeforeEach;
119
import org.junit.jupiter.api.Test;
1210

@@ -19,24 +17,6 @@ void setUp() {
1917
list = new SelfOrganizingLinkedList<>();
2018
}
2119

22-
/** Helper to extract all list elements in order via repeated search/head inspection. */
23-
private List<Integer> toList() {
24-
List<Integer> result = new ArrayList<>();
25-
int currentSize = list.getSize();
26-
if (currentSize == 0) {
27-
return result;
28-
}
29-
30-
// Search each node sequentially from head to verify integrity without breaking state
31-
for (int i = 0; i < currentSize; i++) {
32-
Integer val = list.getHeadValue();
33-
result.add(val);
34-
// Move head to back by searching for it, allowing us to inspect the next element
35-
// or we can verify order by tracking transitions.
36-
}
37-
return result;
38-
}
39-
4020
@Test
4121
void testEmptyListAndGetters() {
4222
assertTrue(list.isEmpty());

0 commit comments

Comments
 (0)