Class MergesortTest
java.lang.Object
topics.sorting.mergesort.MergesortTest
Validation Suite for Mergesort
Verifies the recursive partitioning and O(N) linear merging capabilities of the algorithm using JUnit 5.
- Author:
- vicegd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidsetup()(package private) voidScenario: A large array consisting of exactly 1,000 elements strictly in reverse order.(package private) voidScenario: Small array with mixed inversions.
-
Constructor Details
-
MergesortTest
MergesortTest()
-
-
Method Details
-
setup
@BeforeAll static void setup() -
shouldSortSmallMixedSequence
@Test void shouldSortSmallMixedSequence()Scenario: Small array with mixed inversions.
-
shouldSortLargeReversedSequence
@Test void shouldSortLargeReversedSequence()Scenario: A large array consisting of exactly 1,000 elements strictly in reverse order.
Observation: Evaluates the algorithm's performance when encountering the theoretical worst-case structural alignment for many algorithms.
-