Class SequentialSearchTest
java.lang.Object
topics.divideconquer.search.SequentialSearchTest
Validation Suite for Sequential Search
Validates tracking accuracy for existing and missing elements across both iteration and stack-based recursion bounds.
- Author:
- vicegd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidsetup()(package private) void(package private) void(package private) void(package private) void
-
Constructor Details
-
SequentialSearchTest
SequentialSearchTest()
-
-
Method Details
-
setup
@BeforeAll static void setup() -
shouldFindElementIteratively
@Test @DisplayName("Iterative: Should find existing element in an unsorted array") void shouldFindElementIteratively() -
shouldReturnMinWhenNotFoundIteratively
@Test @DisplayName("Iterative: Should return MIN_VALUE when element does not exist") void shouldReturnMinWhenNotFoundIteratively() -
shouldFindElementRecursively
@Test @DisplayName("Recursive: Should find existing element in an unsorted array") void shouldFindElementRecursively() -
shouldReturnMinWhenNotFoundRecursively
@Test @DisplayName("Recursive: Should return MIN_VALUE when element does not exist") void shouldReturnMinWhenNotFoundRecursively()
-