Class StringInterleavingTest
java.lang.Object
topics.greedy.stringinterleaving.StringInterleavingTest
Validation Suite for Greedy String Interleaving
Demonstrates successful cases where Greedy works (disjoint or non-ambiguous strings), and explicitly demonstrates the Greedy Trap where it incorrectly fails on valid interleavings.
- 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
-
StringInterleavingTest
StringInterleavingTest()
-
-
Method Details
-
setup
@BeforeAll static void setup() -
shouldVerifyCleanInterleaving
@Test @DisplayName("Should successfully verify a clean, sequential interleaving (Case A)") void shouldVerifyCleanInterleaving() -
shouldVerifyMixedInterleaving
@Test @DisplayName("Should successfully verify a mixed interleaving (Case C)") void shouldVerifyMixedInterleaving() -
shouldRejectIncorrectLengths
@Test @DisplayName("Should quickly reject strings with incorrect total lengths") void shouldRejectIncorrectLengths() -
shouldDemonstrateGreedyTrap
@Test @DisplayName("Should fall into the Greedy Trap with ambiguous choices") void shouldDemonstrateGreedyTrap()
-