Skip to content

Commit 54bfd96

Browse files
authored
Update LowerBoundTest.java
1 parent 9e26033 commit 54bfd96

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,4 @@ void testLowerBoundNonExistentValue() {
5959
assertEquals(4, lowerBound.find(array, 7), "Lower bound for 7 should be at index 4");
6060
assertEquals(0, lowerBound.find(array, 0), "Lower bound for 0 should be at index 0");
6161
}
62-
63-
/**
64-
* Test finding the lower bound in a large sorted array with random integers.
65-
*/
66-
@Test
67-
void testLowerBoundRandomNumbers() {
68-
Random random = new Random();
69-
int size = 100;
70-
Integer[] array = random.ints(size, 1, 100).sorted().boxed().toArray(Integer[] ::new);
71-
72-
int target = random.nextInt(100) + 1; // Random target value between 1 and 100
73-
74-
Arrays.sort(array); // Ensure the array is sorted
75-
LowerBound lowerBound = new LowerBound();
76-
int lowerBoundIndex = lowerBound.find(array, target);
77-
78-
// Check if the found index is valid
79-
if (lowerBoundIndex < size) {
80-
assertTrue(array[lowerBoundIndex] >= target, "Lower bound index should point to a value >= target.");
81-
}
82-
}
8362
}

0 commit comments

Comments
 (0)