Skip to content

Commit 3b1e3fb

Browse files
author
Alex Klymenko
committed
refactor: fix import ordering
1 parent 422959d commit 3b1e3fb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/main/java/com/thealgorithms/datastructures/dynamicarray/DynamicArray.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ public E remove(final int index) {
9999
if (index < 0 || index >= size) {
100100
throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
101101
}
102-
@SuppressWarnings("unchecked")
103-
E oldElement = (E) elements[index];
102+
@SuppressWarnings("unchecked") E oldElement = (E) elements[index];
104103
fastRemove(index);
105104
modCount++; // Increment modification count
106105
return oldElement;

src/test/java/com/thealgorithms/datastructures/dynamicarray/DynamicArrayTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package com.thealgorithms.datastructures.dynamicarray;
22

3-
import org.junit.jupiter.api.BeforeEach;
4-
import org.junit.jupiter.api.Test;
5-
63
import static org.junit.jupiter.api.Assertions.assertEquals;
74
import static org.junit.jupiter.api.Assertions.assertFalse;
85
import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -11,6 +8,8 @@
118
import java.util.ConcurrentModificationException;
129
import java.util.Iterator;
1310
import java.util.stream.Collectors;
11+
import org.junit.jupiter.api.BeforeEach;
12+
import org.junit.jupiter.api.Test;
1413

1514
public class DynamicArrayTest {
1615

0 commit comments

Comments
 (0)