Skip to content

Commit 3bd0766

Browse files
committed
Fix
1 parent 2e0e082 commit 3bd0766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/com/thealgorithms/searches/LinearSearchTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void testLinearSearchMultipleOccurrences() {
111111
void testLinearSearchRandomArray() {
112112
LinearSearch linearSearch = new LinearSearch();
113113
Random random = new Random();
114-
Integer[] array = random.ints(0, 1000).distinct().limit(1000).boxed().toArray(Integer[]::new);
114+
Integer[] array = random.ints(0, 1000).distinct().limit(1000).boxed().toArray(Integer[] ::new);
115115
Integer key = array[random.nextInt(array.length)]; // Key should be in the array
116116
assertEquals(java.util.Arrays.asList(array).indexOf(key), linearSearch.find(array, key), "The index of the found element should match.");
117117
}

0 commit comments

Comments
 (0)